Orphaned, empty folders do not get deleted on fsck

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Orphaned, empty folders do not get deleted on fsck

Postby jayrock » Mon Oct 03, 2011 1:27 am

Hi,

I noticed that one of the folders I once had and then deleted still exists in the samba share. It does not exists anymore indeed in the greyhole directories, but it does exists in the share. I ran an fsck but that didn't remove. Here's a bash log to illustrate what I mean. I'm not sure what events lead to this situation. No files were lost so that's fine with me, however I think this should be addressed.

Cheers,

jayrock

Code: Select all

jayrock ~/Desktop$ sudo ls -al /var/hda/files/Software/Fedora/AF98015/ total 8 drwxrwxr-x 2 jayrock users 4096 Sep 29 06:04 . drwxrwxr-x 3 jarock users 4096 Sep 30 09:46 .. jayrock ~/Desktop$ sudo ls -al /var/hda/files/gh/Software/Fedora/AF98015 ls: cannot access /var/hda/files/gh/Software/Fedora/AF98015: No such file or directory jayrock ~/Desktop$ sudo ls -al /var/hda/files/drives/drive5/gh/Software/Fedora/AF98015 ls: cannot access /var/hda/files/drives/drive5/gh/Software/Fedora/AF98015: No such file or directory jayrock ~/Desktop$

sag47
Posts: 43
Joined: Sun Feb 13, 2011 9:27 am

Re: Orphaned, empty folders do not get deleted on fsck

Postby sag47 » Tue Oct 04, 2011 8:47 pm

Hi,

I noticed that one of the folders I once had and then deleted still exists in the samba share. It does not exists anymore indeed in the greyhole directories, but it does exists in the share. I ran an fsck but that didn't remove. Here's a bash log to illustrate what I mean. I'm not sure what events lead to this situation. No files were lost so that's fine with me, however I think this should be addressed.

Cheers,

jayrock

Code: Select all

jayrock ~/Desktop$ sudo ls -al /var/hda/files/Software/Fedora/AF98015/ total 8 drwxrwxr-x 2 jayrock users 4096 Sep 29 06:04 . drwxrwxr-x 3 jarock users 4096 Sep 30 09:46 .. jayrock ~/Desktop$ sudo ls -al /var/hda/files/gh/Software/Fedora/AF98015 ls: cannot access /var/hda/files/gh/Software/Fedora/AF98015: No such file or directory jayrock ~/Desktop$ sudo ls -al /var/hda/files/drives/drive5/gh/Software/Fedora/AF98015 ls: cannot access /var/hda/files/drives/drive5/gh/Software/Fedora/AF98015: No such file or directory jayrock ~/Desktop$
From my understanding of greyhole it distributes the files across the drives and creates symlinks in the share. So while that folder doesn't exist the symlink does.
The following should output like so...

Code: Select all

ls -al /var/hda/files/gh/Software/Fedora/ | grep 'AF98015' lrwxrwxr-x 3 jayrock users 4096 Sep 30 09:46 AF98015 -> /some/location
If you deleted all of the content then you can just get rid of the dead symlink.

Code: Select all

rm /var/hda/files/drives/drive5/gh/Software/Fedora/AF98015
Pay attention to my commands carefully so you don't delete something you'll regret.

SAM

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Orphaned, empty folders do not get deleted on fsck

Postby jayrock » Tue Oct 04, 2011 10:17 pm

Hi Sam,

fully agree, however I think that greyhole creates symlinks for files, but for folders greyhole creates actual folders in the share. The symlinks are sorted in true folders. In my case, I suspect, when I deleted the files in the share so the real files got deleted and the symlinks removed. So far so good. When it comes to the folder, the "real" folders got removed but not the folder that originally contained the symlinks.

There is no problem in deleting that folder manually. My point is I think that the folder should be removed automatically during and fsck, which apparently isn't the case.

Cheers,
jayrock

sag47
Posts: 43
Joined: Sun Feb 13, 2011 9:27 am

Re: Orphaned, empty folders do not get deleted on fsck

Postby sag47 » Wed Oct 05, 2011 3:07 pm

A fsck wouldn't do that because an empty folder (or folder full of dead symlinks) is not a filesystem error.

rjwaldren
Posts: 71
Joined: Mon Jan 17, 2011 7:15 pm

Re: Orphaned, empty folders do not get deleted on fsck

Postby rjwaldren » Thu Oct 06, 2011 12:19 pm

I believe Jayrock is referingto greyhole --fsck
Not the e2fs program fsck

Agreed that this should be handled, this has been a hold up with converting some shares to greyhole until I have my structure set in stone.
Amahi 6.1 x86_64 ExpressCD - Intel D510MO, 2GB, Promise TX300
1x 500GB 2.5" WD Black (OS and LZ). Pool: 1x 1.5TB Samsung F2, 1x 1.5TB Samsung F3, 1x 2TB Samsung F4EG
Apps: uShare, uTorrent, Amahi Energy Saver

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Orphaned, empty folders do not get deleted on fsck

Postby jayrock » Thu Oct 06, 2011 8:29 pm

I believe Jayrock is referingto greyhole --fsck
Not the e2fs program fsck
Exactly.

Who is online

Users browsing this forum: No registered users and 4 guests