[Gluster-users] How does replication work?

Alan Ivey ai4891 at yahoo.com
Tue Sep 8 15:42:03 UTC 2009


>> Like the subject implies, how does replication work exactly?

>> 
>> If a client is the only one that has the IP addresses defined for the servers, does that mean that only a client writing a file ensures that it goes to both servers? That would tell me that the servers don't directly communicate with each other for replication.
>> 
>> If so, how does healing work? Since the client is the only configuration with the multiple server IP addresses, is it the client's "task" to make sure the server heals itself once it's back online?
>> 
>> If not, how do they servers know each other exist if not for the client config file?

> You've answered your own question. :)  AFAIK, in the recommended simple replication scenario, the client is actually responsible for replication, as each server is functionally independant.

> (This seems crazy to me, but yes, that's how it works.)

Thanks for the reply Daniel. I've been experimenting with it this morning and specifically the auto-healing feature. I've found out that it really only auto-heals when I ls the client directory. That's the only time I was able to get the second server to catch up with the files that were written while the second server was down. I was hoping that any operating performed on the client would cause the second server to catch all the way up to the second server, but creating a new file replicated it on both machines, but not the files created in the meantime.

So, my question now is, what operations cause the auto-healing to execute? I was only able to get it to catch up when running ls on the client-side. I'm envisioning using this as HA-NFS, and so if I want all servers to always have the correct files and perms, should I create a cron to run ls on the client directory every minute?

According to the documentation at http://www.gluster.com/community/documentation/index.php/Understanding_AFR_Translator#Frequently_Asked_Questions , it looks like indeed running an ls is a sure-fire way to self-heal all directories. Without this intervention, what glusterfs client commands will cause this to happen?

Thanks again!


More information about the Gluster-users mailing list