Page 1 of 1

How do you "gracefully" clear Greyhole (tombstones, etc)?

Posted: Tue Feb 01, 2011 7:16 am
by dinomic
Hi all,

I've been playing about with the storage pool, to get used to how Greyhole stores everything before committing to moving all my files over to it. Now that I'm ready, I still can't seem to clear everything in Greyhole.

Initially, I deleted everything from the Shares and wondered why the space was still being used up on the drives. I've since run "greyhole --empty-attic", and this has cleared up a lot of space, but I'm still getting around 200MB being used up on each drive!

I therefore thought that this must be the Greyhole tombstone files, so I deleted and recreated the "gh" directories on each drive. This freed up some space, but not all (still have about 195MB used up on each drive). Running the "greyhole --stats" shows that nothing is being used, but I can clearly see that something is using up space:

Total - Used = Free + Attic = Possible
/var/hda/files/drives/drive1/gh: 1833G - 0G = 1740G + 0G = 1740G
/var/hda/files/drives/drive2/gh: 1833G - 0G = 1740G + 0G = 1740G
/var/hda/files/drives/drive3/gh: 1375G - 0G = 1305G + 0G = 1305G
/var/hda/files/drives/drive4/gh: 1375G - 0G = 1305G + 0G = 1305G

Therefore, I have 2 questions:
1) How much space to the tombstones take up, and when files are deleted for good (out of attic too!), do these still stay there? If so, why?
2) How can I get rid of everything regarding Greyhole history, so that I can start using the Pool as if it was still Brand New?

Re: How do you "gracefully" clear Greyhole (tombstones, etc)

Posted: Tue Feb 01, 2011 7:39 am
by dinomic
I *should* add that it's the "Storage - Partitions" page that reports each drive as using up about 195Mb:
Image

Re: How do you "gracefully" clear Greyhole (tombstones, etc)

Posted: Wed Feb 02, 2011 5:20 pm
by gboudreau
Unselect each drive from the storage pool page in the Amahi Dashboard.
Delete the gh folder on each drive.
Select each drive again in the storage pool page in the Amahi Dashboard.

Greyhole stores everything in the gh folder, including tombstones.
If you want to know what takes space on your drives, use du:

Code: Select all

du -s /var/hda/files/drives/drive*/*

Re: How do you "gracefully" clear Greyhole (tombstones, etc)

Posted: Wed Feb 02, 2011 7:48 pm
by dinomic
Hi gboudreau, thanks for this!

I ran du before doing anything, and there was minimal usage (bytes!). I then deselected all drives from the pool, deleted the gh and lost+found directories, re-checked them in the pool and then ran du again. Not much difference (less bytes because lost+found didn't get recreated), but this just shows there was hardly any usage to start with.

So my guess is that the pie charts on the "Storage -> Partitions" page are mis-reporting actual usage (showing between 195.3MB and 197.5MB used for each drive).
In contrast, if I go to "Shares -> Storage Pool", all drives in the pool show up as 100% available.

Thanks again!