此内容没有您所选择的语言版本。

F.2. Configuring HA-LVM Failover with Tagging


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
    Copy to Clipboard Toggle word wrap
    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 Conga 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>
    
    Copy to Clipboard Toggle word wrap

    Note

    If there are multiple logical volumes in the volume group, then the logical volume name (lv_name) in the lvm resource should be left blank or unspecified. Also note that in an HA-LVM configuration, a volume group may be used by only a single service.
  4. Edit the volume_list field in the /etc/lvm/lvm.conf file. Include the name of your root volume group and your hostname as listed in the /etc/cluster/cluster.conf file preceded by @. The hostname to include here is the machine on which you are editing the lvm.conf file, not any remote hostname. Note that this string MUST match the node name given in the cluster.conf file. Below is a sample entry from the /etc/lvm/lvm.conf file:
    volume_list = [ "VolGroup00", "@neo-01" ]
    
    Copy to Clipboard Toggle word wrap
    This tag will be used to activate shared VGs or LVs. DO NOT include the names of any volume groups that are to be shared using HA-LVM.
  5. Update the initrd device on all your cluster nodes:
    # mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)
    Copy to Clipboard Toggle word wrap
  6. Reboot all nodes to ensure the correct initrd device is in use.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat