Redhat-Cluster and GFS

  • Thread starter Thread starter scsinutz
  • Start date Start date
S

scsinutz

Guest
Hello,

I would like to use GFS to access my shared storage. My plan is to install GFS on the proxmox host machine and create a loop back mount so that the VZ containers can access the storage. I'm unable to get the redhat-cluster package installed.

Has anyone been able to get GFS working in the proxmox distro?

Thanks.
 
I would recommend using OCFS2, it is available to install on Proxmox and is much easier to configure and manage. I have also found it to be faster than GFS. Just my observations.
 
Thanks for the reply.

I gave up on GFS and did install OCFS2, it was very easy to install and configure. You're right it is much faster than GFS.
 
Also you know about creating bind mount scripts to mount a directory into a container right?

In /etc/vz/conf create a script like this:
Code:
#!/bin/bash

/bin/mount -n --bind /media/shared /var/lib/vz/root/${VEID}/media/shared

exit $?
Name it "VEID".mount (i.e. 101.mount) and make sure that it is executable, you also need to make sure that the destination directory exists in your container. When your container is started it will now mount the directory specified.
 
I'd like to use this script but I haven't be able to get it to work. I put the script into the /etc/vz/conf direcotry. chmod 755 the file. I even changed the ${VEID} to the actual contain ID. When I try and start the container it won't start. I can run the script from the command line manually when the container is running and it works fine.

It would be nice to have some log output for troubleshooting.

Any ideas?
 
Here's the conclusion of my quest. The following script works with a Fiber Channel mounted SAN with LVM.

#!/bin/bash
sleep 1
/bin/mount -n --bind /test /var/lib/vz/root/${VEID}/media/testmount
exit $?

The LVM needs to be mounted to a directory on the Proxmox VE first. This is because mount with the --bind option takes two directories as arguments and complains when the first argument (/test in this case) is a device.

Second, the script needs to sleep for an extra second to allow the mount point to be created, otherwise it tries to mount to a directory which does not yet exist. Using the command line vzctl start <VMID> to start and stop the container is a huge help for seeing problems immediately.

Thank you very much dietmar!