Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

8.8. Testing the Configuration

It is important that all SCSI fencing requirements be met in order for your system to successfully fence a node using SCSI persistent reservations. The SCSI fencing requirements are noted in Section 8.2, “SCSI Fencing Requirements and Limitations”. To ensure that your system meets these requirements, you should test your configuration.
After the cluster.conf has been set up on all of the nodes in the system, you can perform the following procedure to verify that all of the requirements have been met for SCSI fencing and that the configuration is successful.
  1. For every node in the cluster, you should verify that the necessary infrastructure is up and running:
    • Ensure that the cluster infrastructure is up and running on every node in the cluster; you can check this with the cman_tool status command.
    • Ensure that the clvmd daemon is running; you can check this with the service clvmd status command.
    • Ensure that the scsi_reserve service has been turned on by executing the chkconfig scsi_reserve on command.
  2. Set up cluster LVM volumes to test.
    [root@tng3-1 ~]# pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1
    [root@tng3-1 ~]# vgcreate new_vol_group /dev/sda1 /dev/sdb1 /dev/sdc1
    [root@tng3-1 ~]# lvcreate -L2G -n new_logical_volume new_vol_group
    [root@tng3-1 ~]# gfs_mkfs -plock_nolock -j 1 /dev/new_vol_group/new_logical_volume
    [root@tng3-1 ~]# mount /dev/new_vol_group/new_logical_volume /mnt
  3. Run the scsi_reserve init script on all nodes, and then check to see whether this worked.
    [root@clusternode1 ~]# service scsi_reserve start
    [root@clusternode1 ~]# service scsi_reserve status
    [root@clusternode2 ~]# service scsi_reserve start
    [root@clusternode2 ~]# service scsi_reserve status
    [root@clusternode3 ~]# service scsi_reserve start
    [root@clusternode3 ~]# service scsi_reserve status
  4. Execute the following commands and check whether the nodes have been fenced.
    # /sbin/fence_node clusternode1.example.com
    # /sbin/fence_node clusternode2.example.com
    # /sbin/fence_node clusternode3.example.com