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.
Caution The tests overwrite and destroy data on the disks, unless you use the -r option.
ssh
(default) or rsh communication. If you use rsh, launch the vxfentsthdw utility with the -n option.
After completing the testing process, you can remove permissions for communication and restore public network connections.
vxfenadm -i
diskpath
command to verify a disk's serial number.
-m
option to sample a few disks before creating a disk group and using the -g
option to test them all.
-f
or -g
option, you can review results by redirecting the command output to a file.
The disk /dev/rdsk/c2t13d0s2 is ready to be configured for I/O Fencing on node galaxy
If the utility does not show a message stating a disk is ready, verification has failed.
vxfentsthdw options describes three methods the utility provides to test storage devices.
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 | |
Testing of the return value of | ||
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. | ||
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. | ||
Utility tests the coordinator disk group prompting for systems and devices, and reporting success or failure. | ||
Utility runs manually, in interactive mode, prompting for systems and devices, and reporting success or failure. | For testing a few disks or for sampling disks in larger arrays. | |
Utility tests system/device combinations listed in a text file. |
See Testing the shared disks listed in a file using the -f option | |
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 |
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
******** WARNING!!!!!!!! ********
THIS UTILITY WILL DESTROY THE DATA ON THE DISK!!
Do you still want to continue : [y/n] (default: n) y
Enter the disk name to be checked for SCSI-3 PGR on node galaxy in the format: /dev/rdsk/cxtxdxsx
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
If the serial numbers of the disks are not identical, then the test terminates.
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
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.
Note To test the coordinator disk group using the vxfentsthdw utility, the utility requires that the coordinator disk group, vxfencoorddg, be accessible from two nodes.
To test the coordinator disk group using vxfentsthdw -c
vxfentsthdw
command with the -c
option. For example:
Enter the first node of the cluster:
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.
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
vxdiskadm
utility to remove the failed disk from the disk group. Refer to the Veritas Volume Manager Administrator's Guide.
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.
You can perform non-destructive testing on the disk devices when you want to preserve the data.
To perform non-destructive testing on disks
For example, to use the -m option and the -r option, you can run the utility as follows:
# /opt/VRTSvcs/vxfen/bin/vxfentsthdw -rm
When invoked with the -r option, the utility does not use tests that write to the disks. Therefore, it does not test the disks for all of the usual conditions of use.
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
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.
# /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.
# /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.
# yes | /opt/VRTSvcs/vxfen/bin/vxfentsthdw -f disks_blue > blue_test.txt
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
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
******** 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.