Skip to content

nfs

How to setup a NAS with GlusterFS Striped & Replicated + NFS on Ubuntu 14.04

Gluster is one of the most amazing storage technologies to hit the Open Source world in quite some time. Since it’s been acquired by Red Hat, it’s growth and adaptation has only been accelerated even more. Some refer to it as software defined storage. I agree with that, if you like to use industry lingo. Gluster allows you to create a pool of storage that can span multiple servers / nodes and grow over time. You can create volumes that mirror or replicate data across multiple servers or you can stripe a volume across multiple servers. You can even strip with redundancy, kind of like a RAID 5 but instead of disks, its servers. Very cool stuff.

Gluster has an NFS server built in. It actually works very well too. This makes it compatible with pretty much every hypervisor there is, such as VMware ESXi, Citrix XenServer, KVM, Proxmox, oVirt, and every other virtualization platform there is. I have yet to come across one that doesn’t support NFS. More so, every OS and server variation also supports NFS. This makes Gluster an excellent choice to build a storage infrastructure on. You can start small and grow it over time, or go all in. Either way, this guide will help you get started.

Today I’m working with four Ubuntu 14.04 LTS servers (virtual machines, actually). Each has a second virtual disk attached, 30GB in size, that will be dedicated to Gluster on each host. I’m going to set up a stripe, with redundancy, across these four nodes, which will be presented as a single NFS share available to a hypervisor for virtual machine storage, or a server for file storage. If you plan on following this guide exactly, go ahead and provision four Ubuntu 14.04 virtual machines with an extra 30GB drive attached to each. 1GB of RAM and 1 CPU will be more than sufficient. Lets get started.

Creating a GlusterFS volume striped + replicated across 4 nodes

FYI, look at the bash prompt label to see which server i’m working on. I.E. [email protected]:~$ is the gfsu1 node. If the bash prompt is a #, that means the instruction needs to be performed on all four nodes.

The four Ubuntu Gluster nodes i’m working with are named:

  • gfsu1 (GlusterFS-Ubuntu-1)
  • gfsu2
  • gfsu3
  • gfsu4

So, just keep an eye out for what node I’m working on based on the bash prompt label. First, make sure everything is updated and upgraded.

#  sudo apt-get update
#  sudo apt-get upgrade

Next, make sure software-properties-common is installed.

#  sudo apt-get install software-properties-common

Click Here To View The Rest!

How to install GlusterFS + NFS on CentOS 7 for Virtual Machine Storage

GlusterFS is one of the fastest growing Open Source storage platforms in existence. It’s very simple to install, scale, and manage. What makes Gluster so amazing, is its ability to scale and replicate. It really sets the bar for software defined storage systems. It runs on whitebox hardware, or virtual machines. Lately, I’ve come across quite a few people that seem to be scared of Gluster and don’t know where to begin. I am here to help! Today, we’re going to install and configure GlusterFS on a CentOS 7 virtual machine; and, we’re going to make it NFS accessible for VM storage. Every hypervisor in existence supports NFS storage for virtual machines, including VMware ESXi / vSphere, Proxmox, Xen, KVM, oVirt, OpenStack, and all the others.

Installing GlusterFS Server and Client on CentOS 7 (two nodes)

I am using two virtual machines, each running CentOS 7. Their hostnames are gfs1 and gfs2. I have added a 40GB second disk to each VM that will be dedicated to GlusterFS. I suggest you have an identically sized second partition or drive on each of your systems as well.

As always, after connecting via SSH or console, go ahead and make sure everything is updated and upgraded on both nodes.

yum -y update

And, let’s go ahead and install a few useful packages (both nodes).

yum -y install nano net-tools wget

Edit the hosts file on both nodes. Make sure both nodes can resolve to each other via hostname.

nano /etc/hosts

Screen Shot 2015-06-03 at 1.44.35 PM

Now we can download and install Gluster (both nodes).

Click Here To Read The Rest!