Greyhole behind the scenes

sidelight
Posts: 21
Joined: Wed Mar 23, 2011 3:12 am

Greyhole behind the scenes

Postby sidelight » Wed Mar 23, 2011 3:18 am

I have a system which is a mix of internal and external drives. I want to prioritize the internal drives in the pool so that the external drive gets used as a last resort. Having recently read http://www.pommepause.com/blog/2010/03/ ... l-is-that/ I decided this woudl get me some of the way there but cannot work out how to modify the greyhole.yml file to achieve this.

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

Re: Greyhole behind the scenes

Postby gboudreau » Wed Mar 23, 2011 3:45 am

The sticky_files option will probably get you where you want to be.

What you want is to define sticky_files for all your shares, with stick_into value that will point to your internal drives.

The downside of this is that the same drive will always be used first for the files of a specific share. i.e. you'll need to manage the pooling manually.

You can see examples of sticky_files & stick_into here: http://wiki.amahi.org/index.php/Greyhol ... ed_options

For example, if your internal drives are drive1 to drive3 in /var/hda/files/drives/

Code: Select all

sticky_files = Videos/ stick_into = /var/hda/files/drives/drive1 stick_into = /var/hda/files/drives/drive2 stick_into = /var/hda/files/drives/drive3 sticky_files = Music/ stick_into = /var/hda/files/drives/drive2 stick_into = /var/hda/files/drives/drive3 stick_into = /var/hda/files/drives/drive1 sticky_files = Photos/ stick_into = /var/hda/files/drives/drive3 stick_into = /var/hda/files/drives/drive1 stick_into = /var/hda/files/drives/drive2
Notice how I alternate the order the drives are used. This is to try to spread the data on the different drives.
- Guillaume Boudreau

sidelight
Posts: 21
Joined: Wed Mar 23, 2011 3:12 am

Re: Greyhole behind the scenes

Postby sidelight » Wed Mar 23, 2011 5:28 am

OK sounds good so can I just make sure I understand this

lets say I have 3 internal drives and 2 external drives.

I want to be able to say for example

Code: Select all

sticky_files = Videos/ stick_into = /var/hda/files/drives/drive1 stick_into = /var/hda/files/drives/drive2 stick_into = /var/hda/files/drives/drive3
which would mean 'prefer' Videos on drive1, overspill onto drive2 then drive3

How does this affect pooling? I am worried that for example some areas I want to do this for require multiple copies. Ideally I'd like to specify that that external drives should be used for secondary copies, but I know that today I cannot do that.

So what I want to do is weight the USB to be the least favoured drive (which is why I mentioned that link in my original post).

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

Re: Greyhole behind the scenes

Postby gboudreau » Wed Mar 23, 2011 6:01 am

The example you give above also applies to multiple copies.

If you specify you want two copies of your files, the first one would be on drive1, and the second on drive2.
If drive1 ever gets filled, the 1st copy would go on drive2, and the 2nd copy on drive3. etc.

So if you want a share with 2 file copies, and you want the 2nd on an external drive, you can specify that drive as the second stick into drive. This will work until the 1st drive is filled to capacity. At that point, you'd need to manually change the stick_into options to specify other drives to use.

As I said, using sticky_files forces you to manually manage the pooling.
This is not ideal, but it's the best you can do with Greyhole, unless you're a programer and would like to add this feature into Greyhole yourself.

Note: the correct stick_into path to use would be /var/hda/files/drives/drive#/gh, since Amahi creates a gh folder at the root of your drives, and uses that to store pooled data.
- Guillaume Boudreau

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

Re: Greyhole behind the scenes

Postby gboudreau » Wed Mar 23, 2011 6:06 am

An issue has been created on the Greyhole issue tracker, to keep track of this enhancement request: http://code.google.com/p/greyhole/issues/detail?id=69
You can star that issue if you'd like to be notified if this ever gets implemented.
- Guillaume Boudreau

sidelight
Posts: 21
Joined: Wed Mar 23, 2011 3:12 am

Re: Greyhole behind the scenes

Postby sidelight » Wed Mar 23, 2011 6:15 am

Thanks gboudreau

Who is online

Users browsing this forum: No registered users and 14 guests