[Linux-cluster] Some ideas on changes to the lvm.sh agent (or new agents).

Simone Gotti simone.gotti at email.it
Fri Sep 28 16:14:14 UTC 2007


Trying to use a non cluster vg in redhat cluster I noticed that lvm.sh,
to avoid metadata corruption, is forcing the need of only one lv per vg.

I was thinking that other clusters don't have this limitation as they
let you just use a vg only on one node at a time (and also on one
service group at a time).

To test if this was possible with lvm2 I made little changes to lvm.sh
(just variables renames, use of vgchange instead of lvchange for tag
adding) and using the same changes needed to /etc/lvm/lvm.conf
(volume_list = [ "rootvgname", "@my_hostname" ]) looks like this idea
was working.

I can activate the vg and all of its volume only on the node with the vg
tagged with its hostname and the start on the other nodes is refused.

Now, will this idea be accepted? If so these are a list of possible
needed changes and other ideas:

*) Make <parameter name="vg_name" required="1"> also unique="1" or
better primary="1" and remove the parameter "name" as only one service
can use a vg.

*) What vg_status should do?
a) Monitor all the LVs
b) Check only the VG and use ANOTHER resource agent for every lv used by
the cluster? So I can create/remove/modify lvs on that vg that aren't
under rgmanager control without any error reported by the status
functions of the lvm.sh agent.
Also other clusters distinguish between vg and lv and they have 2
different agents for them. 

Creating two new agents will also leave the actual lvm.sh without
changes and keep backward compatibility for who is already using it.

Something like this (lets call lvm_vg and lvm_lv respectively the agents
for the vg and the lv):

<service name="foo">
  <lvm_vg vgname="vg01">
     <lvm_lv lvname="lv01/>
     <lvm_lv lvname="lv01/>
     <script .... />

*) Another problem that is present just now is that lvm should be
changed to avoid any operation on a non activable vg or lv. In these
days you cannot be able to start a vg/lv as its not tagged with the
hostname but you can remove/resize it without any problem. :D

I'll be happy to provide patches if these idea are accepted!


Simone Gotti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20070928/3abd513a/attachment.sig>

More information about the Linux-cluster mailing list