Glusterfs on top of linux zfs

Glusterfs on top of linux zfs

Glusterfs on top of linux zfs

img src: Link GNU Affero General Public License, version 3.

Did you ever wanted to know how to setup Glusterfs on top of linux zfs or other filesystems? In this article i will describe this in a few easy steps based on my earlier mentioned how to about zfs on linux.

 

First of all let me tell you something about where to use glusterfs

Let’s say you need a heavy write intense network share in a clustered web environment where multiple web server instances needs to get access to same directory, glusterfs would be a good solution to handle that. If you need a network share for reading small files you should prefer use nfs instead of using glusterfs native client.

In my how-to we setup the glusterfs-server on a single instance.

Prerequisites:

  • ZFS on Openstack or ZFS on Proxmox
  • glusterfs-server package for the server
  • glusterfs-client for all the clients
  • nfs-common on clients if you want to use glusterfs nfs shares

 

Install the necessary packages:

On the Server:

aptitude install glusterfs-server

On all your Clients:

aptitude install glusterfs-client

Optional if you want to use glusterfs with nfs:

aptitude install nfs-common


Optional: Only for ZFS Users. You need to create a new filesystem on your zfs storage pool like this, or use an existing one.

zfs create storage/images

 

Create your first Volume on glusterfs server

gluster volume create images 192.168.1.1:/storage/images
gluster volume start images

Check your gluster volume status

gluster volume status

 

Mount your created Volumes on the glusterfs clients

Modify your /etc/fstab in your prefered editor and enter following:

192.168.1.1:/images /storage glusterfs defaults,_netdev 0 0

or optional use nfs for glusterfs mounting:

192.168.1.1:/images /storage nfs defaults,_netdev 0 0

 

After saving type:

mount -a

And that’s it!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.