About the vxfentsthdw utility

You can use the vxfentsthdw utility to verify that shared storage arrays to be used for data support SCSI-3 persistent reservations and I/O fencing. During the I/O fencing configuration, the testing utility is used to test a single disk. The utility has other options that may be more suitable for testing storage devices in other configurations. You also need to test coordinator disk groups.

See Veritas Cluster Server Installation Guide to set up I/O fencing.

The utility, which you can run from one system in the cluster, tests the storage used for data by setting and verifying SCSI-3 registrations on the disk or disks you specify, setting and verifying persistent reservations on the disks, writing data to the disks and reading it, and removing the registrations from the disks. Refer also to the vxfentsthdw(1M) manual page.

General guidelines for using vxfentsthdw
vxfentsthdw options

vxfentsthdw options describes three methods the utility provides to test storage devices.

vxfentsthdw options

vxfentsthdw option

Description

When to use

-n 

Utility uses rsh for communication. 

 

Use when rsh is used for communication. 

 

-r 

Non-destructive testing. Testing of the disks for SCSI-3 persistent reservations occurs in a non-destructive way; that is, there is only testing for reads, not writes. May be used with -m, -f, or -g options. 

Use during non-destructive testing. 

See Performing non-destructive testing on the disks using the -r option 

-t 

Testing of the return value of SCSI TEST UNIT (TUR) command under SCSI-3 reservations. A warning is printed on failure of TUR testing. 

When you want to perform TUR testing. 

-d 

Use DMP devices. 

May be used with -c or -g options. 

With the -d option, the script picks the DMP paths for disks in the diskgroup. 

By default, the script uses the -w option to pick up the OS paths for disks in the disk group. 

-w 

Use raw devices. 

May be used with -c or -g options. 

By default, the script picks up the raw paths for disks in the diskgroup.  

If you want the script to use the raw paths for disks in the diskgroup, use the -d option. 

-c 

Utility tests the coordinator disk group prompting for systems and devices, and reporting success or failure. 

For testing disks in coordinator disk group. 

See Testing the coordinator disk group using vxfentsthdw -c 

-m 

Utility runs manually, in interactive mode, prompting for systems and devices, and reporting success or failure. 

May be used with -r and -t options. 

-m is the default option. 

For testing a few disks or for sampling disks in larger arrays. 

See Testing the shared disks using the -m option 

-f filename 

Utility tests system/device combinations listed in a text file.  

May be used with -r and -t options. 

For testing several disks.  

See Testing the shared disks listed in a file using the -f option 

-g disk_group 

Utility tests all disk devices in a specified disk group. 

May be used with -r and -t options. 

For testing many disks and arrays of disks. Disk groups may be temporarily created for testing purposes and destroyed (ungrouped) after testing. 

See Testing all the disks in a diskgroup using the -g option 

Testing the shared disks using the -m option

Review the procedure to test the shared disks. By default, the utility uses the -m option.

This procedure uses the /dev/rdsk/c2t13d0s2 disk in the steps.

If the utility does not show a message stating a disk is ready, verification has failed. Failure of verification can be the result of an improperly configured disk array. It can also be caused by a bad disk.

If the failure is due to a bad disk, remove and replace it. The vxfentsthdw utility indicates a disk can be used for I/O fencing with a message resembling:

The disk /dev/rdsk/c2t13d0s2 is ready to be configured for I/O Fencing on node galaxy

To test disks using vxfentsthdw script

  1. Make sure system-to-system communication is functioning properly.
  2. From one node, start the utility.

    # /opt/VRTSvcs/vxfen/bin/vxfentsthdw [-n]

  3. After reviewing the overview and warning that the tests overwrite data on the disks, confirm to continue the process and enter the node names.

    ******** WARNING!!!!!!!! ********

    THIS UTILITY WILL DESTROY THE DATA ON THE DISK!!

    Do you still want to continue : [y/n] (default: n) y

    Enter the first node of the cluster: galaxy

    Enter the second node of the cluster: nebula

  4. Enter the names of the disks you are checking. For each node, the disk may be known by the same name:

    Enter the disk name to be checked for SCSI-3 PGR on node galaxy in the format: /dev/rdsk/cxtxdxsx

    /dev/rdsk/c2t13d0s2

    Enter the disk name to be checked for SCSI-3 PGR on node nebula in the format: /dev/rdsk/cxtxdxsx

    Make sure it's the same disk as seen by nodes galaxy and nebula

    /dev/rdsk/c2t13d0s2

    If the serial numbers of the disks are not identical, then the test terminates.

  5. Review the output as the utility performs the checks and report its activities.
  6. If a disk is ready for I/O fencing on each node, the utility reports success:

    ALL tests on the disk /dev/rdsk/c2t13d0s2 have PASSED

    The disk is now ready to be configured for I/O Fencing on node galaxy

  7. Run the vxfentsthdw utility for each disk you intend to verify.
Testing the coordinator disk group using vxfentsthdw -c

Use the vxfentsthdw utility to verify disks are configured to support I/O fencing. In this procedure, the vxfentsthdw utility tests the three disks one disk at a time from each node.

To test the coordinator disk group using vxfentsthdw -c

  1. Use the vxfentsthdw command with the -c option. For example:

    # /opt/VRTSvcs/vxfen/bin/vxfentsthdw -c vxfencoorddg

  2. Enter the nodes you are using to test the coordinator disks:

    Enter the first node of the cluster:

    galaxy

    Enter the second node of the cluster:

    nebula

  1. Review the output of the testing process for both nodes for all disks in the coordinator disk group. Each disk should display output that resembles:

    ALL tests on the disk /dev/rdsk/c1t1d0s2 have PASSED.

    The disk is now ready to be configured for I/O Fencing on node galaxy as a COORDINATOR DISK.

    ALL tests on the disk /dev/rdsk/c4t1d0s2 have PASSED.

    The disk is now ready to be configured for I/O Fencing on node nebula as a COORDINATOR DISK.

  2. After you test all disks in the disk group, the vxfencoorddg disk group is ready for use.

Removing and replacing a failed disk

If a disk in the coordinator disk group fails verification, remove the failed disk or LUN from the vxfencoorddg disk group, replace it with another, and retest the disk group.

To remove and replace a failed disk

  1. Use the vxdiskadm utility to remove the failed disk from the disk group. Refer to the Veritas Volume Manager Administrator's Guide.
  2. Add a new disk to the node, initialize it, and add it to the coordinator disk group.

    See Veritas Cluster Server Installation Guide for instructions to initialize disks for I/O fencing and to set up coordinator disk groups.

    If necessary, restart the disk group.

    See the Veritas Volume Manager Administrator's Guide for instructions to start the disk group.

  3. Retest the disk group.

    See Testing the coordinator disk group using vxfentsthdw -c

Performing non-destructive testing on the disks using the -r option

You can perform non-destructive testing on the disk devices when you want to preserve the data.

To perform non-destructive testing on disks

Testing the shared disks listed in a file using the -f option

Use the -f option to test disks that are listed in a text file. Review the following example procedure.

To test the shared disks listed in a file

  1. Create a text file disks_test to test two disks shared by systems galaxy and nebula that might resemble:

    galaxy /dev/rdsk/c2t2d1s2 nebula /dev/rdsk/c3t2d1s2

    galaxy /dev/rdsk/c2t2d1s2 nebula /dev/rdsk/c3t2d1s2

    where the first disk is listed in the first line and is seen by galaxy as /dev/rdsk/c2t2d1s2 and by nebula as /dev/rdsk/c3t2d1s2. The other disk, in the second line, is seen as /dev/rdsk/c2t2d2s2 from galaxy and /dev/rdsk/c3t2d2s2 from nebula. Typically, the list of disks could be extensive.

  2. To test the disks, enter the following command:

    # /opt/VRTSvcs/vxfen/bin/vxfentsthdw -f disks_test

    The utility reports the test results one disk at a time, just as for the -m option.

  3. To redirect the test results to a text file, enter the following command:

    # /opt/VRTSvcs/vxfen/bin/vxfentsthdw -f disks_test > test_disks.txt

    Caution   Be advised that by redirecting the command's output to a file, a warning that the testing destroys data on the disks cannot be seen until the testing is done.

    Precede the command with "yes" to acknowledge that the testing destroys any data on the disks to be tested.

    For example:

    # yes | /opt/VRTSvcs/vxfen/bin/vxfentsthdw -f disks_blue > blue_test.txt

Testing all the disks in a diskgroup using the -g option

Use the -g option to test all disks within a disk group. For example, you create a temporary disk group consisting of all disks in a disk array and test the group.

Note   Do not import the test disk group as shared; that is, do not use the -s option.

After testing, destroy the disk group and put the disks into disk groups as you need.

To test all the disks in a diskgroup

  1. Create a diskgroup for the disks that you want to test.
  2. Enter the following command to test the diskgroup test_disks_dg:

    # /opt/VRTSvcs/vxfen/bin/vxfentsthdw -g test_disks_dg

    The utility reports the test results one disk at a time.

  3. To redirect the test results to a text file for review, enter the following command:

    # /opt/VRTSvcs/vxfen/bin/vxfentsthdw -g \

    test_disks_dg > dgtestdisks.txt

Testing a disk with existing keys

If the utility detects that a coordinator disk has existing keys, you see a message that resembles:

There are Veritas I/O fencing keys on the disk. Please make sure

that I/O fencing is shut down on all nodes of the cluster before

continuing.

******** WARNING!!!!!!!! ********

THIS SCRIPT CAN ONLY BE USED IF THERE ARE NO OTHER ACTIVE NODES IN THE CLUSTER! VERIFY ALL OTHER NODES ARE POWERED OFF OR INCAPABLE OF ACCESSING SHARED STORAGE.

If this is not the case, data corruption will result.

Do you still want to continue : [y/n] (default: n) y

The utility prompts you with a warning before proceeding. You may continue as long as I/O fencing is not yet configured.