How to add glusterfs storage to RHEVM ?

In this article I am going to show that how can we use gluster as backend for storing Virtual Machine disks.

1)  I have three node trusted storage pool. I have one existing Dist Volume with name vol1 which is distributed across three nodes. Its not recommended way to do it. I suggest you to create Replicated volume. Currently redhat is supporting only two node replica.

[root@Node1 ~]# gluster vol status
Status of volume: vol1
Gluster process                                         Port    Online  Pid
Brick                    49152   Y       1464
Brick                 49152   Y       1449
Brick                 49152   Y       1813
NFS Server on localhost                                 2049    Y       1472
NFS Server on                            2049    Y       1824
NFS Server on                            2049    Y       1457

Task Status of Volume vol1
There are no active volume tasks

2) While I was trying to create new domain in RHEVM environment. I was getting the below error.

“Error while executing action Add Storage Connection: Permission settings on the specified path do not allow access to the storage.Verify permission settings on the specified storage path.”

3) I google about this error I found that we need to set couple of parameters on gluster volume to make it detectable in RHEVM.

[root@Node1 ~]# gluster volume set vol1 group virt
volume set: success

[root@Node1 ~]# gluster volume set vol1 storage.owner-uid 36
volume set: success

[root@Node1 ~]# gluster volume set vol1 storage.owner-gid 36
volume set: success

Step 4 : After making above changes I was able to scan the storage volume vol1 inside the RHEVM. I created on VM using glusterfs as storage.

Step 5 : I went to gluster node Node1 to see the virtual disks.

[root@Node1 ~]# mount.glusterfs /mnt
[root@Node1 ~]# cd /mnt
[root@Node1 mnt]# cd 05096fa3-2d61-4ca2-b1dc-82ead6ad0dcc
[root@Node1 05096fa3-2d61-4ca2-b1dc-82ead6ad0dcc]# ll
total 0
drwxr-xr-x 2 vdsm kvm  96 Feb 10  2015 dom_md
drwxr-xr-x 3 vdsm kvm 147 Feb 10  2015 images
drwxr-xr-x 4 vdsm kvm  84 Feb 10  2015 master

Now I am good to create VMs by using gluster storage.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s