Jerry Ablan wrote:
Has anyone played with OCFS2?
Thanks for suggesting this. I've done a fresh install of CentOS 5.2 and put OCFS2 on top. Its really easy to use and install and the the performance looks really good. I'm going to be using OCFS2 for a few more applications from now on.
Meanwhile...
Once I ran up Xen on these machines I was able to use file based storage allocation to the VMs and have it running with reasonable performance.
My original problem is still there however. I've tested the flock functionality of OCFS2 and it works but Xen it seems doesn't do locking even on a shared filesystem. It is possible that Xen is trying to do some other sort of file locking but unfortunately OCFS2 only supports flock.
I could write some scripts to replace xm which could check for the existence of a lock file before attempting to start a VM but that seems a bit clunky.
Is there a proper way to do this?
Regards Brett
-----Original Message----- From: centos-virt-bounces@centos.org [mailto:centos-virt-bounces@centos.org] On Behalf Of Brett Worth Sent: Thursday, August 21, 2008 6:22 AM To: Discussion about the virtualization on CentOS Subject: [CentOS-virt] Shared Storage Options
Hello all.
I would like to canvas some opinions on options for shared storage in a Xen cluster. So far I've experimented with using iSCSI and clvm which mixed success.
The primary concern I have with both of these options is that there seems to be no obvious way to ensure exclusive access to the LUN/device to the VM I want to run. On a couple of occasions during my playing I've accidentally started the same VM on two servers and corrupted the said filesystem.
I've tried setting up GFS but I don't think I'm smart enough to do that. The fencing has me baffled. In fact fencing had me baffled with clvm but I somehow managed to trick it into working though probably not how it's supposed to.
I'd be happy to persist with either of the above methods if I could work out how to lock the device. Can anyone offer some advice?
Regards Brett Worth
Hi Brett,
I could write some scripts to replace xm which could check for the existence of a lock file before attempting to start a VM but that seems a bit clunky.
Is there a proper way to do this?
A thread on the topic from the Xen mailing list: http://xen.markmail.org/search/?q=device+lock#query:device lock+page:1+mid:ouugxur56hqikqty+state:results
Cheers, Todd
Todd Deshane wrote:
A thread on the topic from the Xen mailing list: http://xen.markmail.org/search/?q=device+lock#query:device lock+page:1+mid:ouugxur56hqikqty+state:results
That looks great. I'll try it out now. It does file based locking but could easily be modified to do flock based locking.
Brett
Brett Worth wrote:
My original problem is still there however. I've tested the flock functionality of OCFS2 and it works but Xen it seems doesn't do locking even on a shared filesystem. It is possible that Xen is trying to do some other sort of file locking but unfortunately OCFS2 only supports flock.
OCFS2 1.4 (recently released) supports clustered flock:
http://oss.oracle.com/pipermail/ocfs2-announce/2008-August/000027.html
I'm not sure how filesystem locking relates to Xen, though. Xen has nothing to do with it. It only supplies the shared writable (w!) block device.