Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to set up glusterfs to replace my use of NFS4, how can I do that?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

(inprogress answer, any help testing this and editing would be appreciated, this works and has been tested on 12.04, but only by me!)

This is a step by step tutorial based on Michael J. Chudobiak's guide for Fedora. This assumes that you're trying to share the /fileserver directory from a central server to clients. I could never get this work in the past but gave it a shot in 12.04 and is now actually easier to me than using NFS.

On the server:

Install the server: sudo apt-get install glusterfs-server

First create a volume you want to share, you can name it whatever you want, in this example I'm naming it volumename, and then you use your server's DNS name, I don't have DNS for my machines at home so I user servername.local to use the avahi-assigned DNS name:

sudo gluster volume create volumename transport tcp yourservername:/fileserver

Now we start the volume:

sudo gluster volume start volumename

And that's it! The server is now serving a gluster share called volumename.

On each client:

Install the client: sudo apt-get install glusterfs-client

Now let's mount the shared glusterfs volume

    mount -t glusterfs yourservername:/volumename /mountdirectory

On the client, see if you can access the files in /fileserver. If not, read the /var/log/glusterfs/* files on both the client and the server.

To mount the share at boot, you can add this to your /etc/fstab

yourservername:/volumename /mountdirectory glusterfs defaults,_netdev 0 0

References:

share|improve this answer

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.