Installation guide
<lvm ref="lvm"/>
<fs ref="FS"/>
</service>
</rm>
F.2. Configuring HA-LVM Failover wit h T agging
To set up HA-LVM failover by using tags in the /etc/lvm/lvm.conf file, perform the following
steps:
1. Ensure that the locking_type parameter in the global section of the /etc/lvm/lvm.conf
file is set to the value '1'.
2. Create the logical volume and file system using standard LVM and file system commands, as
in the following example.
# pvcreate /dev/sd[cde]1
# vgcreate shared_vg /dev/sd[cde]1
# lvcreate -L 10G -n ha_lv shared_vg
# mkfs.ext3 /dev/shared_vg/ha_lv
For information on creating LVM logical volumes, refer to Logical Volume Manager
Administration.
3. Edit the /etc/cluster/cluster.conf file to include the newly created logical volume as a
resource in one of your services. Alternately, you can use Co n g a or the ccs command to
configure LVM and file system resources for the cluster. The following is a sample resource
manager section from the /etc/cluster/cluster.conf file that configures a CLVM
logical volume as a cluster resource:
<rm>
<failoverdomains>
<failoverdomain name="FD" ordered="1" restricted="0">
<failoverdomainnode name="neo-01" priority="1"/>
<failoverdomainnode name="neo-02" priority="2"/>
</failoverdomain>
</failoverdomains>
<resources>
<lvm name="lvm" vg_name="shared_vg" lv_name="ha_lv"/>
<fs name="FS" device="/dev/shared_vg/ha_lv" force_fsck="0"
force_unmount="1" fsid="64050" fstype="ext3" mountpoint="/mnt" options=""
self_fence="0"/>
</resources>
<service autostart="1" domain="FD" name="serv" recovery="relocate">
<lvm ref="lvm"/>
<fs ref="FS"/>
</service>
</rm>
Red Hat Ent erprise Linux 5 Clust er Administ rat ion
124