Does Gluster volume support if I run virtual machine on it

Latest response

Environment

Gluster installed.
Total nodes = 2
Replication in configured.

gluster volume info
Volume Name: gv1
Type: Replicate
Volume ID: d32f24df-c145-465e-8f4d-bf7e6ab545c7
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: NODE1:/data/brick1/gv1
Brick2: NODE2:/data/brick1/gv1

df -h

Filesystem Size Used Avail Use Mounted on
/dev/sda3 9.5G 9.5G 0 100% /
tmpfs 948M 232K 947M 1% /dev/shm
/dev/sda1 190M 53M 127M 30% /boot
/dev/mapper/vg_node1-LogVol00 15G 37M 14G 1% /home
/dev/sda5 2.4G 3.9M 2.3G 1% /tmp
/dev/sda6 2.4G 388M 1.9G 18% /var
/dev/sr0 3.6G 3.6G 0 100% /media/CentOS_6.5_Final
NODE1:/gv1 9.5G 9.5G 0 100% /mnt

Query

When I replicate any file /folder on any of the node. it successfully replicated. I want to replicate a virtual machine so that the change can be replicate from one node to another. I want to run a virtual machine on the gluster filesystem. is it possible ?
(currently I copy a virtual machine on gluster filesystem but when I try to run it, the virtual machine got hunged while booting.)

Responses

Hello Zahid,

When you say you "replicate any file" - do you mean that you are copying from a Gluster Client (and not the bricks themselves?)

If you are making a copy of the Virtual Machine virtual-disk images, I believe you should be fine as long as you have shut the machine down (additionally you may want to review the following https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Evaluation_Guide/Evaluation_Guide-Create_RHEL_Template.html)

Gluster is a supported option for Virtualization:
KVM - http://blog.gluster.org/category/kvm/
RHEV (oVirt) - http://community.redhat.com/blog/2014/05/ovirt-3-4-glusterized/

Some items to consider:
* was the original guest shut down when you made the copy
* was there only a single disk
* did you recreate the UUID and update the paths for your Virtual Machine configuration
* Is SElinux (or POSIX flie permissions) preventing the machine from running?

One thing I noticed from your post: you have filesystems that are 100% full. Are you certain you were able to copy the entire VM disk image? Also - when a virtual machine is started, several files are touched, updated, modified - perhaps the full filesystem is preventing the machine from starting. (This is based on the assumption that your df output is your Hypervisor)

An additional item: Are you using Gluster to replicate the Volume (and then attempting to use the replicated data)?

When you say you "replicate any file" - do you mean that you are copying from a Gluster Client (and not the bricks themselves?)

"" We have two NODES are in Gluster Storage Pool (NODE1 and NODE2). On NODE1 I mount the Glusterfs and try to run the virtual machine.""

If you are making a copy of the Virtual Machine virtual-disk images, I believe you should be fine as long as you have shut the machine down

""From a windows node where a virtual machine was OFFLINE. I copy that VM and paste in to the mounted gluster volume""

Some items to consider:
* was the original guest shut down when you made the copy
YES
* was there only a single disk
YES VM HAVE A SINGLE .vmdk DISK
* did you recreate the UUID and update the paths for your Virtual Machine configuration
NO
* Is SElinux (or POSIX flie permissions) preventing the machine from running?
SELINUX IS DISABLED

One thing I noticed from your post: you have filesystems that are 100% full

I managed the filesystem space.

[root@NODE1 Windows XP Fresh]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 9.5G 3.5G 5.6G 39% /
/dev/sdc1 20G 1.4G 18G 8% /data/brick1
NODE1:/gv1 20G 1.4G 18G 8% /mnt
/dev/sr0 3.6G 3.6G 0 100% /media/CentOS_6.5_Final
[root@NODE1 Windows XP Fresh]# gluster volume info gv1

Volume Name: gv1
Type: Replicate
Volume ID: 61617cc7-0ce2-4464-b9c1-d00f030e8836
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: NODE1:/data/brick1/gv1
Brick2: NODE2:/data/brick1/gv1

I installed a new VM on the GlusterFS (instead of copying the VM) and now VM is working fit.

  • On NODE2 the same VM is replicated and OFFLINE.
  • I created a folder on NODE1 desktop and start the replicated VM from NODE2. I am able to see the folder on desktop.
  • Now both VMs are started. But now when I create a folder to any VM it is not replicating.
  • I figured out the one VM should be OFFLINE state. So the changes are successfully replicating to the OFFLINE VM (which is on NODE2)

"My Query"
- We should OFFLINE one VM at a time ?
- As the GlusterFS volume mounts in READ/WRITE mode on both NODES so the VM should replicate there folders to each other while ONLINE.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.