Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are using RHEL5.3 with a Clarion SAN attached by FC.

Our situation is that we have a number of LUNs presented to Hosts and we want to dynamically present the LUNs to Xen Guests. We are not sure on what the best practice approach is to set this up. The Xen guests will form a cluster together and need the LUNs only for data partitions, i.e. when they are actively running services.

So one approach would be to always present all disks to all Xen guests, and then rely up on the cluster software, and mount itself, to not mount the disk twice in two locations. This sounds kinda risky and also is not very secure (one cracked guest can see/destroy all the data).

Another approach would be to dynamically add and remove the disks from the Xen guests at the dom0 level (using xm block-attach). This could work but sounds slightly complicated, I'm wondering whether Red Hat Cluster Suite supports this in some way or whether there are scripts to do this.

Yet another approach would be to have the LUNs endpointed at the Xen guests themselves - I'm not sure whether this is technically possible since the multipathing has to be done at the Host level.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I had the same question. My answer was to present the LUNs to all DomUs and have the DomUs control the access.

A better approach might be to run the cluster-lvm on your DomUs. (/etc/lvm/lvm.conf locking_type=3 on RH should do the trick). After that present all LUNs to all DomUs, create PVs, VGs and LVs as needed from within a DomU.

I would not go for gfs or ocfs if you don`t need concurrent access on the same LUNs.

share|improve this answer
    
Excellent, thanks this is what I thought –  giant_squid May 31 '11 at 23:08

Have you considered a clustered file system like GFS?

share|improve this answer
    
I did consider it, how would you recommend we use it? A naive approach may be for each xen guest to mount a number of GFS partitions (maybe broken into databases) - and rely on the cluster software to make sure no two services try to write to the data at the same time. This may work, we use SQLite which has locking mechanisms already, but I'm concerned that the performance would be low. –  giant_squid Apr 21 '10 at 4:45
    
Locking shouldn't be an issue, as you have a dedicated piece of software for this with GFS, and if your main use is SQLite, this shouldn't be overloaded (rapidly opening/closing many files is the main impact factor here). Reading and writing will be as fast as you can write to the LUN, which is the reason for clustered filesystems: Direct, concurrent access to the block device. So, your "naive" approach may work well, but I can't comment on issues with Xen and multipathing. –  SvW Apr 21 '10 at 10:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.