[Linux-cluster] Re: Linux-cluster Digest, Preventing LVM from concurrent access

Rafael Micó Miranda rmicmirregs at gmail.com
Mon Aug 24 20:05:03 UTC 2009

Hi Edson,

El lun, 24-08-2009 a las 16:27 -0300, Edson Marquezani Filho escribió:

> >
> > You need to define a service the cluster has to handle. You plan to run
> > Xen Virtual Machines, don't you? You'll need a service, at least, formed
> > by:
> >
> > 1.- An IP Address where the service is offered
> > 2.- A shared storage where the virtual machines lay
> > 3.- A "binary" or "system call out" to start the Xen service when the
> > two preceding items are taken.
> >
> Maybe I have not been clear enough. When I said that I was thinking
> about writing a script, I was refering to a service script, like those
> found in /etc/init.d.

I'm sorry I did not understand you. Yes, you could use your own script
to start the Xen services as the last resource you need to run to start
your service.

You will need to include that resource into your service as a "script"
resource. Take a look at it in this link:


Remember to build your script LSB compliant as the page says. I can't
find any documentation relative to RedHat about this LSB compliance,
maybe it has its "own standard".

> Ok, I have tried to make my own cluster.conf, and I would apreciate if
> you could validate it to me. I took the conf generated here by Luci,
> your example, and another example from here[1], and I have made
> mine[2].

Sorry I cant validate it, my lab is not available now. I took a look at
it and there are some points you must change: 

1.- lvm-cluster resource definition: the arguments vg_name and lv_name
are mandatory. You must activate a logical volume into the volume group.
As far as i know, you cant build the filesystem on top of the volume
group directly, and I built the script with some checks to avoid that. 

2.- Filesystem resource: you need to mount the filesystem stored into
the logical volume you activate. You need a filesystem to store the VMs,
don't you? Or do you use a "raw device" in your Xen service?

I updated your pastebin file. I'm not sure if it will be fully

Maybe you should even nest the resources building your service to be
sure they are started in order. It will depend on your service. Check my

> It has a fence action, but not a quorum disk yet, the two lvm-cluster
> resources I need, and one service definition, which would launch the
> VMs with a script made by me. I didn't specified a logical volume,
> because I want the whole VG locked. I can do that, can't I ?
> Obs: nobody has told me, but I guess that I should put your
> lvm-cluster.sh in /usr/share/cluster/, am I right?

Yes, you are right. Keep an eye on the rights of the file just to be the
same as the others.

> Am I thinking correctly now?
> Thank you, again.
> Obs: I don't need an IP section because all my services (that are
> IP-dependant, off course) run inside the VMs, and they have their own
> IPs, it don't matter which phisical server they are running on. Ok?

Yes, but if you have a management console for your VM service you will
need a Virtual IP which "floats" with the service, so you can always
connect to the same IP to check the status of your virtualization
service. You can make that attaching a IP resource to your service.

> [1] http://sources.redhat.com/cluster/wiki/QuickStart-Portuguese
> [2] http://pastebin.com/f1601e50e
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster



Rafael Micó Miranda

More information about the Linux-cluster mailing list