vxfenadm: The vxfenadm utility enables the vxfen driver to manage SCSI-3 registrations and reservations on disks for purposes of I/O fencing. In the event of a split-brain condition, I/O fencing allows only a system with a valid registration to write to a disk. Thus, I/O fencing prevents data corruption on the disks. System administrators can use the -a, -m, -n, -x, -p, -s, and -r flags to validate the accessibility of the disks and to perform troubleshooting tasks; these options do not actually implement fencing
Note: While using -x and -p options, make sure I/O fencing is not configured; these options will overwrite valid keys used by VxVM.
A disk_filename contains the list of all disks and each path (in the event of multiple paths) in a disk group.
If administrators use the -p, -a, -m, -n, or -x options, the key is 8-bytes whatever the user supplies. Administrators can use the utility to display state information, registration and reservation information, and key definitions. The vxfenadm utility supports both character and numeric key formats.
-k key : key is a character string. If key is less than 8 bytes in length, then vxfenadm will append it with – (hyphen). For keys shorter than 8 bytes, use -K KEY where KEY is in the numeric (ascii value) format.
-K KEY : KEY is in numeric (ascii value) format. For example, the equivalent numeric format for the key APGR000 is 65,80,71,82,48,48,48,0. Because the key is seven bytes long, 0 is used for the eighth byte.
vxfenclearpre : The vxfenclearpre utility provides a user with a way to easily clear all SCSI3 registration and reservation keys from the set of coordinator disks as well as the set of shared data disks. This applies to CVM Disk Groups only, as Private Disk Groups have their keys cleared when the disk groups are imported.
Warning: Please exercise caution and make sure that there are no other active nodes in the cluster when running this. If there are other nodes present and accessing shared storage, data corruption will result!
If you enter the following command to register a key AVCS:
# vxfenadm -m -k AVCS -f disk_filename
-k AVCS will convert the key to AVCS —- before the SCSI-3 command is issued to the device. AVCS will register as AVCS—- on the disk.
The same holds for other SCSI-3 commands. If you try to unregister a key with character format that is less than 8 bytes, the unregistration fails.
::: To Read the keys registered on a disk using the vxfenadm
# vxfenadm -g all -f disk_filename
Device Name: <diskpath>
Total Number Of Keys: 2
Key Value [Numeric Format]: 65,80,71,82,48,48,48,0
Key Value [Character Format]: APGR000
If you unregister the key using the following command, the unregistration fails:
In this case, the key registered on the disks is APGR000. But the vxfenadm command implicitly converted the key to APGR000-. Hence the unregistration failed. The unregistration will succeed with the numeric format.
::: To successfully unregister the key, enter the following command:
I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com.
You can connect me at - https://www.linkedin.com/in/unixadminschool/