Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got multiple servers which all need to have the same content in /home. In other words, if the file /home/user1/test.txt is updated on server A, this needs to be replicated to all other servers in the cluster.

Is it possible to use GlusterFS for this purpose? That is, let each server have a full copy of all data locally - which that server will be working on - and solely use GlusterFS to take care of replicating this data to the other servers?

I'm not intersted in a combined storage, but rather have all data on all machines only to have GlusterFS to replicate it to the other machines.

share|improve this question
    
Also see: serverfault.com/questions/177720/… –  Tom O'Connor Nov 25 '12 at 22:44
    

1 Answer 1

up vote 1 down vote accepted

Yeah. This is pretty much a reference case for GlusterFS. One of the best things about GlusterFS is having the data stored locally, and also replicated to other cluster members. Meaning you can alternatively look it up from the Gluster Client - which gives you failover, or you can also grab the data directly off the "storage brick" location. - Good for backups.

Gluster also supports exporting volumes using NFSv3, but you don't get failover if you're using the NFS mechanism, as opposed to the FUSE-based client.

The Gluster Quick start guide should be a pretty good starting point for you.. and the administration guide has all the other answers.

That said.. GlusterFS can behave oddly if you're using it for database backend storage.. I wouldn't really want to put /var/lib/mysql on there, for example. The locks get a bit messy.

share|improve this answer
    
Alright, so if i set up GlusterFS with 'replicate' and not 'distribute', then all files will remain at all nodes? I was thinking of using GlusterFS to keep files in synch between webservers, so it'll only be a question of PHP files and user uploaded content. However, it's critical that files are available locally with regards to performance. –  sbrattla Nov 26 '12 at 7:13
    
...and by the way; say i set up 10 nodes with replication. That is; a single file should always be replicated to the 9 other nodes. Is that an alright setup, or something not recommended? –  sbrattla Nov 26 '12 at 7:17
    
If you set up glusterfs on replicate mode, you'll get N copies of the files across the nodes. Which might mean 1 copy per node, but also might mean M copies per N nodes. It also means that you can't add 1..N nodes, but instead your next cluster size must be 2N nodes or 3N .. –  Tom O'Connor Nov 26 '12 at 8:40
    
The above behavior may have changed recently. I haven't tested it in 2-3 years –  Tom O'Connor Nov 26 '12 at 8:43
    
Aha, so this then means that there is no guarantee that all files are available locally at all nodes? –  sbrattla Nov 26 '12 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.