[mogilefs] bradfitz, r1114: more work on custom replication
brad at danga.com
Thu Aug 16 19:11:05 UTC 2007
On Thu, 16 Aug 2007, Arthur Bebak wrote:
> Brad Fitzpatrick wrote:
> > Mogilers,
> > This might be of interest to some of you....
> > It's now quite easy to drop in your own custom replication policies.
> Is there any documentation on what you need to do to write your own
> replication policy?
> Watching this list (and for my own blatently selfish reasons :)
> I think a number of people would be interested in having a replication policy
> which spreads files not just across disk devices but across hosts.
> In other words the same file is not allowed to be replicated to another
> device on the same host. This helps reliability if you have a storage
> hosts with multiple hard drives (devs).
> I'll probably have to write something like that so it would be helpful
> if there was some documentation on how to do it.
That's exactly what the default policy already does. Read the docs:
To write your own replication policy, subclass
MogileFS::ReplicationPolicy, and override the 'replicate_to' function.
Just see the source to the base class and/or MultipleHosts.pm and it'll
More information about the mogilefs