Submitting lvm-cluster resource script
Hi,
I previously submitted this to the list in the following thread:
https://www.redhat.com/archives/cluster-devel/2009-June/msg00020.html
I just want to submit a new version, the diff patch against the previous version (which can be found in the older thread) and a readme file to help people in the deployment and usage of the lvm-cluster resource script.
md5sums:
fe6bf8a73ab059231172210f299f943d lvm-cluster.sh 5c6679317e90af5c3cf933d972df20bb patch-v1 f1dcd80729066bf57cc6743a16fcb261 README.txt
Cheers,
Rafael
Signature · 93 lines
Rafael Mic?? Miranda -------------- next part -------------- A non-text attachment was scrubbed... Name: lvm-cluster.sh Type: application/x-shellscript Size: 9452 bytes Desc: not available URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20091005/cc4fc30f/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: patch-v1 Type: text/x-patch Size: 2073 bytes Desc: not available URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20091005/cc4fc30f/attachment-0001.bin> -------------- next part -------------- GENERAL INFORMATION: LVM volume resource script for clusters, with ability to get exclusive access of Logical Volumes. This is intended to be used with non-clustered filesystems, such as EXT3. This way, you can define cluster services with filesystem resources with a protection to avoid the filesystems being mounted, by hand, in more than one node, avoiding corruption. Tested and developed on: RedHat Enterprise Linux 5.3 x86_64 cman-2.0.98-1.el5.x86_64 openais-0.80.3-22.el5.x86_64 rgmanager-2.0.46-1.el5.x86_64 lvm2-cluster-2.02.40-7.el5.x86_64 INSTALLATION: Jut copy "lvm-cluster.sh" resource script into your resource scripts directory, usually /usr/share/cluster/ Keep an eye on the rights of the file just to be the same as the others in the dir. USAGE: As part of the use of the lvm-cluster.sh resource script, you need to: 1.- Configure your multipathing software 2.- Configure properly the locking_type into lvm.conf to type 3 in all your systems. 3.- Create your Physical Volumes (PVs) 4.- Configure your Volume Groups (VGs) as clustered Volume Groups 5.- Create your Logical Volumes (LVs) into the clustered Volume Groups 6.- And, and the not so obvious, de-activate all the Logical Volumes you plan to use as exclusive Logical Volumes (using exclusive flag). De-activation can be done with "vgchange -an volgrp01/logvol01" or similar command. EXAMPLES: Example of cluster.conf file content: [...] <resources> <ip address="172.26.2.1" monitor_link="1"/> <lvm-cluster name="logvol01" vg_name="volgrp01" lv_name="logvol01" exclusive="yes"/> <fs device="/dev/volgrp01/logvol01" force_fsck="1" force_unmount="1" fsid="40231" fstype="ext3" mountpoint="/imports/vol01" name="Filesystem01" options="" self_fence="1"/> <nfsexport name="/imports/vol01"/> <nfsclient name="Clients01" options="fsid=1001,async,no_root_squash,rw,mountpoint=/imports/vol01" path="/imports/vol01" target="172.26.0.80"/> </resources> <service autostart="1" domain="failoverdomain01" name="service01" recovery="restart"> <lvm-cluster ref="logvol01"> <fs ref="Filesystem01"> <nfsexport ref="/imports/vol01"> <nfsclient ref="Clients01"/> </nfsexport> <ip ref="172.26.2.1"/> </fs> </lvm-cluster> </service> [...] CONTACT THE AUTHOR: Send comments or feedback to Rafael Mic? (rmicmirregs [at] gmail (dot) com) -EOF-