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

dinomic
Posts: 65
Joined: Mon Jan 03, 2011 6:49 am

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

Postby dinomic » Tue Feb 01, 2011 7:16 am

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?
Norco 4220 Case
Gigabyte GA-G33-DS3R Motherboard w/ 8GB RAM
LSI SAS2116PCIe 6GB/s SAS (replaced 3Ware 9690SA-4I & Chenbro CK1360)
1 x Hitachi 160Gb2.5" System Drive (original 1 x OCZ 60GB Vertex 2 SATAII 2.5" SSD died)
8 x 4TB Hitachi Deskstars
6 x 3TB Hitachi Deskstars
6 x 2TB Hitachi Deskstars (1 dead!)

dinomic
Posts: 65
Joined: Mon Jan 03, 2011 6:49 am

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

Postby dinomic » Tue Feb 01, 2011 7:39 am

I *should* add that it's the "Storage - Partitions" page that reports each drive as using up about 195Mb:
Image
Norco 4220 Case
Gigabyte GA-G33-DS3R Motherboard w/ 8GB RAM
LSI SAS2116PCIe 6GB/s SAS (replaced 3Ware 9690SA-4I & Chenbro CK1360)
1 x Hitachi 160Gb2.5" System Drive (original 1 x OCZ 60GB Vertex 2 SATAII 2.5" SSD died)
8 x 4TB Hitachi Deskstars
6 x 3TB Hitachi Deskstars
6 x 2TB Hitachi Deskstars (1 dead!)

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

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

Postby gboudreau » Wed Feb 02, 2011 5:20 pm

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*/*
- Guillaume Boudreau

dinomic
Posts: 65
Joined: Mon Jan 03, 2011 6:49 am

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

Postby dinomic » Wed Feb 02, 2011 7:48 pm

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!
Norco 4220 Case
Gigabyte GA-G33-DS3R Motherboard w/ 8GB RAM
LSI SAS2116PCIe 6GB/s SAS (replaced 3Ware 9690SA-4I & Chenbro CK1360)
1 x Hitachi 160Gb2.5" System Drive (original 1 x OCZ 60GB Vertex 2 SATAII 2.5" SSD died)
8 x 4TB Hitachi Deskstars
6 x 3TB Hitachi Deskstars
6 x 2TB Hitachi Deskstars (1 dead!)

Who is online

Users browsing this forum: No registered users and 37 guests