Greyhole Attic Question

Quazeye
Posts: 19
Joined: Wed Jun 30, 2010 9:41 pm
Location: Calgary, Alberta, Canada

Greyhole Attic Question

Postby Quazeye » Mon Jul 05, 2010 4:37 pm

Hi,

I found some info here about the Greyhole Attic (recycle bin)

http://code.google.com/p/greyhole/sourc ... .conf?r=96

I love that this acts as a recycle bin as this was a feature I missed greatly with Windows Home Server. I have a few questions about this.

1) Do all files deleted from Shares go to there respective Attics?

2) Is it possible to set a time to delete the files automatically, say if I wanted to delete any files that are over 30 or 60 days old?

3) Can I access the attic from Windows somehow? If so how?

Thank you,
Quaz

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

Re: Greyhole Attic Question

Postby gboudreau » Mon Jul 05, 2010 8:12 pm

1) Yes, all deleted files go to .../gh/.gh_attic/share_name/...
Each drive in your storage pool has it's own attic, so with 3 drives in your storage pool, you'll have 3 attics.
You can check the size of each with:

Code: Select all

greyhole --stats
2) Not easily no. Greyhole doesn't touch attics by itself. If you'd like to do that, you could use a cron job that would look for files older than X days in those dirs, and delete them.
Maybe a command like this:

Code: Select all

find .../gh/.gh_attic -ctime +30
Once you confirmed the find command lists the files you'd want go, you can add an exec parameter to delete the files:

Code: Select all

find .../gh/.gh_attic -ctime +30 -exec rm -f {} \;
Finally, you'd need to add a cron to execute that command daily (as root).

3) No, the attics are not accessible through the shares.
Not unless you're ready to manually create a share pointing to the .../gh/.gh_attic directory for each of your drives...
(Make sure to not enable 'Uses Pool' for those, or you'll get in trouble!)
- Guillaume Boudreau

Quazeye
Posts: 19
Joined: Wed Jun 30, 2010 9:41 pm
Location: Calgary, Alberta, Canada

Re: Greyhole Attic Question

Postby Quazeye » Tue Jul 06, 2010 9:58 am

Thank you Guillaume,

Can I request a feature be added that allows a user to select an amount of time they want to keep files for (30 Days, 60 Days, or never delete, or whatever amount of time they want). Also a feature to restore a file would be awesome. I tended to accidentally delete files on my old server on occasion (not Amahi and had no recycle bin) and there was no way to recover it. I realize I can do all this manually but just having to click a few buttons would be awesome.

Thanks,
Quaz

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

Re: Greyhole Attic Question

Postby gboudreau » Tue Jul 06, 2010 10:10 am

The Greyhole attic is temporary. It's enabled by default until I feel GH is stable enough to not be required.
As such, I doubt I'll ever take time to develop better user interaction with it.

If you want a recycle bin on your shares, there's a samba module for that, which is called recycle: http://www.samba.org/samba/docs/man/Sam ... #id2651247

I'm not sure you'll be able to install that on Amahi though, as it requires using the "vfs objects" Samba configuration line, which Amahi already uses to enable Greyhole, and you probably won't be able to add another value there because of that.

You can always fill a feature request (not sure where that should go... bugs.amahi.org maybe?) that would ask for a checkbox, per share, to enable the recycle module.
- Guillaume Boudreau

Quazeye
Posts: 19
Joined: Wed Jun 30, 2010 9:41 pm
Location: Calgary, Alberta, Canada

Re: Greyhole Attic Question

Postby Quazeye » Tue Jul 06, 2010 12:05 pm

Hi Guillaume,

I am sorry to hear that this will not be available in the future as it is a cool feature. Will you leave the option in and just disable it by default so that we can enable it if we want it? Thanks for the info... I have tried to use the vfs = recycle in the Extra Parameters in the shares but it didn't work for me, it never created the directory when I deleted a file.

Thank you,
Quaz

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

Re: Greyhole Attic Question

Postby gboudreau » Tue Jul 06, 2010 1:56 pm

I don't plan to remove the attic in GH, just disable it by default. It takes a lot of space, because it's also used for deprecated versions of modified files, so each time you modify a file that has 1+ extra copies, the old version of all extra copies are copied in the attics.

To enable both recycle and greyhole VFS modules, the correct syntax for smb.conf would be:

Code: Select all

vfs objects = recycle greyhole
(It's important that recycle is first, followed by greyhole.)

The thing is, if you add such a line in extra params, you'll end up with 2 lines in your smb.conf, because Amahi adds one if you check "Uses Pool":

Code: Select all

vfs objects = greyhole
And I'm not sure how Samba will like that... It might not start, or it might use the 1st, or the 2nd.
You can try.
- Guillaume Boudreau

Quazeye
Posts: 19
Joined: Wed Jun 30, 2010 9:41 pm
Location: Calgary, Alberta, Canada

Re: Greyhole Attic Question

Postby Quazeye » Tue Jul 06, 2010 2:06 pm

Thank you for the help. I will try to edit the smb.conf when I get home tonight.

Quaz

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

Re: Greyhole Attic Question

Postby gboudreau » Tue Jul 06, 2010 3:55 pm

Amahi overwrites smb.conf completely each time you change or add a share, or change storage pool config, and probably on reboot, so your changes will be overwritten soon after you make them.
- Guillaume Boudreau

Quazeye
Posts: 19
Joined: Wed Jun 30, 2010 9:41 pm
Location: Calgary, Alberta, Canada

Re: Greyhole Attic Question

Postby Quazeye » Tue Jul 06, 2010 9:15 pm

Okay... so is there a way to make the change stay?

Thanks,
Quaz

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

Re: Greyhole Attic Question

Postby gboudreau » Wed Jul 07, 2010 3:02 am

No, thus why I said you'd need to request that feature.
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 14 guests