6

Recently noticed that one of my CentOS NFS clients have a directory which looks somewhat corrupted:

CentOS release 6.3 (Final)

[root@LG-B8A-LNX ~]# ls -lathr /
ls: cannot access /zebra: No such file or directory
total 134K
d??????????   ? ?    ?       ?            ? zebra

Remove attempts failed:

[root@LG-B8A-LNX ~]# rm -fr /zebra
rm: cannot remove `/zebra': Is a directory

As well as lookup attemps:

[root@LG-B8A-LNX ~]# stat /zebra
stat: cannot stat `/zebra': No such file or directory

In the past this folder was used as a mount point to an NFS server

Can this directory entry be deleted in some way?

13
  • 3
    You'll probably need to fsck the filesystem.
    – muru
    Mar 2, 2017 at 10:16
  • @muru Thanks, but if it safe to run it on mounted filesystem? fsck / gives me warning that /dev/sda3 is mounted
    – Samuel
    Mar 2, 2017 at 10:19
  • 2
    No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
    – muru
    Mar 2, 2017 at 10:21
  • 1
    @RuiFRibeiro No, but this folder was used as a mount point to nfs server
    – Samuel
    Mar 2, 2017 at 10:40
  • 2
    Please add that to the question. Mar 2, 2017 at 10:54

1 Answer 1

1

Check the /etc/mtab, maybe there is a line that still points the directory to the NFS mount. Also check if you have automount service running in the server.

Try lsof | grep /zebra to find any process that may be still using /zebra. Also try umount -l /zebra, and rm -rf again.

1
  • 1
    Sorry, ~]# lsof /zebra lsof: status error on /zebra: No such file or directory
    – Samuel
    Mar 5, 2017 at 11:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .