This was happening on aix. I was unable to remove a folder . The error it gave was
rm: 0653-611 Directory "xyz " not empty
The issues seems to be because of Unreferenced directory in the filesystem.
I had to un-mount the partition and run an fsck on the filesystem.
fsck /home
FSCK output
===========================================
** Checking /dev/rhd1 (/home)
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
Unreferenced directory I=7743662 owner=bin mode=240750
size=512 mtime=Sep 13 08:00 2010 ; RECONNECT? YES
Directory Inode=7743662 connected, parent was Inode=8990791
Unreferenced directory I=8984658 owner=bin mode=240750
size=512 mtime=Sep 14 03:11 2010 ; RECONNECT? y
Directory Inode=8984658 connected, parent was Inode=8990791
** Phase 4 - Check Reference Counts
link count directory I=7743662 owner=bin mode=240750
size=512 mtime=Sep 13 08:00 2010
count 1 should be 2; ADJUST? y
link count directory I=8984658 owner=bin mode=240750
size=512 mtime=Sep 14 03:11 2010
count 1 should be 2; ADJUST? y
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
526042 files 51713965 blocks 78833747 free
================================================
Once the fsck was done.. After remounting the partition , I was able to remove the folder.
Good Post.
ReplyDeleteHelped me to solve a problem.
Best Regards,
Rodrigo.