vxdisk – UnixArena’s Manual Page
/usr/sbin/vxdisk – Define and manage VERITAS Volume Manager disks
The vxdisk utility performs basic administrative operations on disks. Operations include initializing and replacing disks, as well as taking care of some book-keeping necessary for the disk model presented by VERITAS Volume Manager (VxVM).
[box type=”note” align=”alignleft” ]Note: A disk does not have a disk media name until it has been initialized by VxVM. For vxdisk operations on an initialized disk (disk), the disk may be specified either by its disk access name or by its disk media name.Physical disks in VxVM are assumed to be movable, and are usually identified by a unique disk ID stored on the physical disk, rather than by a disk device node. This allows disks to be moved to different SCSI target IDs or to different controllers without affecting correct operation.[/box]
Tasks | Switches |
Determine the usability of the specified disks | vxdisk [-f] [-g diskgroup] check disk |
Clear the host-specific import information stored on the disks | vxdisk [-f] clearimport accessname … |
Define disk access record, but do not initialize | vxdisk [-f] define accessname [attribute …] |
Uninitializes a disk from VxVM | vxdisk [-f] destroy accessname … |
Rewrite all CDS ID information to the specified disk | vxdisk [-f] flush accessname … |
Initializes regions of a disk used by VxVM. | vxdisk [-f] [-r] init accessname [attribute …] |
Display disk summary | vxdisk [-g diskgroup] list |
Display detailed information about the specified disks | vxdisk [-g diskgroup] list accessname |
Display OS native name based output | vxdisk [-g diskgroup] -e list |
Display Disk summary information about specified disk | vxdisk [-g diskgroup] -s list [accessname] |
Display discovery information about disks | vxdisk [-g diskgroup] -p list [accessname] |
Customized discovery information | vxdisk [-x name1 -x name2] -p list |
Display all disk association information | vxdisk -o alldgs list |
Take the disk offline | vxdisk [-f] [-l filename] offline [accessname …] |
Bring the disk’s to online | vxdisk [-f] [-a] [-l filename] online [accessname …] |
Resize Disks or LUNS | vxdisk [-f] [-g diskgroup] resize {accessname|medianame} [length=value] |
Remove disk from VxVM’s view | vxdisk [-f] rm accessname … |
Initiates the rescanning of devices | vxdisk [-f] scandisks [ [!]device=…| [!]ctlr=…| [!]pctlr=…|new|fabric] |
Updates the unique disk identifier | vxdisk [-g diskgroup] updateudid disk … |
Determine the usability of the specified disks
# vxdisk check c3t1d0 c3t1d0: Error: Disk is not usable # vxdisk check c3t2d0 c3t1d0s2: Okay
Clear the host-specific import information stored on the indicated disks
Example scenario,
[box type=”error” align=”alignleft” ]VxVM vxdg ERROR V-5-1-10978 Disk group testdg: import failed: Disk is in use by another host[/box]
# vxdisk -f clearimport c3t1d0 c3t2d0
Define disk access record, but do not initialize
# vxdisk define c4t13d0 format=cdsdisk
DEVICE TYPE DISK GROUP STATUS c4t13d0s2 auto:cdsdisk - - error Device: c4t13d0s2 devicetag: c4t13d0 type: auto info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2 flags: error private pubpaths: block=/dev/vx/dmp/c4t13d0s2 char=/dev/vx/rdmp/c4t13d0s2 guid: - udid: - site: - errno: Disk is not useable, bad format Multipathing information: numpaths: 1 c4t13d0s2 state=enabled
Un-initializes a disk from VxVM
DEVICE TYPE DISK GROUP STATUS c4t13d0s2 auto:cdsdisk - - online # vxdisk destroy c4t13d0 DEVICE TYPE DISK GROUP STATUS c4t13d0s2 auto:none - - online invalid
Rewrite all CDS ID information to the specified disk
# vxdisk -f flush c4t13d0
Initializes regions of a disk used by VxVM.
DEVICE TYPE DISK GROUP STATUS c4t13d0s2 auto:cdsdisk - - error # vxdisk -f init c4t13d0 format=cdsdisk DEVICE TYPE DISK GROUP STATUS c4t13d0s2 auto:cdsdisk - - online
Display disk summary
# vxdisk list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:sliced rootdisk01 rootdg online c2t0d0s2 auto:sliced rootdisk02 rootdg online c3t1d0s2 auto:cdsdisk c3t1d0 testdg online c3t2d0s2 auto:cdsdisk c3t2d0 testdg online c3t3d0s2 auto:cdsdisk c3t3d0 testdg online nohotuse c3t4d0s2 auto:cdsdisk c3t4d0 testdg online spare c3t5d0s2 auto - - offline c3t6d0s2 auto:cdsdisk disk1 newdg online c4t10d0s2 auto:simple - - online c4t11d0s2 auto:sliced - - online c4t12d0s2 auto:none - - online invalid c4t13d0s2 auto:cdsdisk - - error c4t14d0s2 auto:none - - online invalid - - disk2 newdg failed was:c4t9d0s2
Display detailed information about the specified disks
# vxdisk list Device: c3t1d0s2 devicetag: c3t1d0 type: auto hostid: vxserver disk: name=c3t1d0 id=1411575503.166.vxserver group: name=testdg id=1411577705.178.vxserver info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2 flags: online ready private autoconfig autoimport imported pubpaths: block=/dev/vx/dmp/c3t1d0s2 char=/dev/vx/rdmp/c3t1d0s2 guid: {68391d66-4406-11e4-a991-000c29656c89} udid: VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299459294E7CD53E0D3DEECC10C site: - version: 3.1 iosize: min=512 (bytes) max=2048 (blocks) public: slice=2 offset=65792 len=2031232 disk_offset=0 private: slice=2 offset=256 len=65536 disk_offset=0 update: time=1411587144 seqno=0.27 ssb: actual_seqno=0.0 headers: 0 240 configs: count=1 len=48144 logs: count=1 len=7296 Defined regions: config priv 000048-000239[000192]: copy=01 offset=000000 enabled config priv 000256-048207[047952]: copy=01 offset=000192 enabled log priv 048208-055503[007296]: copy=01 offset=000000 enabled lockrgn priv 055504-055647[000144]: part=00 offset=000000 Multipathing information: numpaths: 1 c3t1d0s2 state=enabled
Display OS native name based output
# vxdisk -e list DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR disk_0 auto:sliced rootdisk02 rootdg online c2t0d0s2 - disk_1 auto:cdsdisk disk1 newdg online c3t6d0s2 - disk_2 auto - - offline c3t5d0s2 - disk_3 auto:sliced rootdisk01 rootdg online c1t0d0s2 - disk_4 auto:cdsdisk c3t4d0 testdg online spare c3t4d0s2 - disk_5 auto:cdsdisk c3t1d0 testdg online c3t1d0s2 - disk_6 auto:cdsdisk c3t3d0 testdg online nohotuse c3t3d0s2 - disk_7 auto:cdsdisk c3t2d0 testdg online c3t2d0s2 - disk_8 auto:simple - - online c4t10d0s2 - disk_9 auto:none - - online invalid c4t12d0s2 - disk_10 auto:cdsdisk - - error c4t13d0s2 - disk_11 auto:sliced - - online c4t11d0s2 - disk_12 auto:none - - online invalid c4t14d0s2 - - - disk2 newdg failed was:c4t9d0s2
Display Disk summary information about specified disk
# vxdisk -s list c3t1d0s2 Disk: c3t1d0s2 type: auto flags: online ready private autoconfig autoimport imported guid: {68391d66-4406-11e4-a991-000c29656c89} udid: VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299459294E7CD53E0D3DEECC10C site: - diskid: 1411575503.166.vxserver dgname: testdg dgid: 1411577705.178.vxserver hostid: vxserver info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2 vxdisk -o mediatype list
Display discovery information about disks
# vxdisk -p list c4t9d0s2 DISK : c4t9d0s2 DISKID : 1411587602.274.vxserver VID : OPNFILER UDID : OPNFILER%5FVIRTUAL-DISK%5FDISKS%5FOPNFILERUEWMXR-tkYE-EV5k SCSI_VERSION : 4 REVISION : 0 PID : VIRTUAL-DISK PHYS_CTLR_NAME : /iscsi MEDIA_TYPE : hdd LUN_SNO_ORDER : 12 LUN_SERIAL_NO : OPNFILERUEWMXR-tkYE-EV5k LIBNAME : scsi3_jbod DMP_DEVICE : c4t9d0 CAB_SERIAL_NO : DISKS ATYPE : Disk ARRAY_PORT_PWWN: ANAME : Disk TRANSPORT : iSCSI ENCLOSURE_NAME : disk DMP_SINGLE_PATH: /dev/rdsk/c4t9d0s2 NUM_PATHS : 1
Customized discovery information
# vxdisk -x DMP_SINGLE_PATH -x NUM_PATHS -p list DEVICE DMP_SINGLE_PATH NUM_PATHS c1t0d0s2 1 /dev/rdsk/c1t0d0s2 c2t0d0s2 1 /dev/rdsk/c2t0d0s2 c4t9d0s2 1 /dev/rdsk/c4t9d0s2 c4t10d0s2 1 /dev/rdsk/c4t10d0s2 c4t11d0s2 1 /dev/rdsk/c4t11d0s2 c4t12d0s2 2 NULL c4t13d0s2 2 NULL c4t14d0s2 2 NULL
Display all disk association information
# vxdisk -o alldgs list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:sliced rootdisk01 rootdg online c2t0d0s2 auto:sliced rootdisk02 rootdg online c3t1d0s2 auto:cdsdisk - (testdg) online c3t2d0s2 auto:cdsdisk - (testdg) online c3t3d0s2 auto:cdsdisk - (testdg) online c3t4d0s2 auto:cdsdisk - (testdg) online c3t5d0s2 auto:cdsdisk - - online c3t6d0s2 auto:cdsdisk - - online
Take the disk offline:
[box type=”note” align=”alignleft” ]This operation cannot be applied to disks that are members of an imported disk group[/box]
# cat /access_names.txt
c3t1d0s2 c3t2d0s2 c3t3d0s2 c3t4d0s2 # vxdisk -f -l /access_names.txt offline DEVICE TYPE DISK GROUP STATUS c3t1d0s2 auto - - offline c3t2d0s2 auto - - offline c3t3d0s2 auto - - offline c3t4d0s2 auto - - offline
Bring the disk’s to online
# vxdisk -f -l /access_names.txt online DEVICE TYPE DISK GROUP STATUS c3t1d0s2 auto:cdsdisk - - online c3t2d0s2 auto:cdsdisk - - online c3t3d0s2 auto:cdsdisk - - online c3t4d0s2 auto:cdsdisk - - online
Re-sizing Disks or LUNS
[box type=”note” align=”alignleft” ]
Note:
- If you dont specify the length, all additional usable space on the device is claimed. – If you shrink a LUN, you must specify the new length explicitly.
- Any volumes on the device should only be grown after the device itself has first been grown. Otherwise, storage other than the device may be used to grow the volumes, or the volume resize may fail if no free storage is available.
- Resizing should only be performed on devices that preserve data. Consult the array documentation to verify that data preservation is supported. – It is possible to resize LUNs that are online but not part of any disk group.
- Do not perform this operation when replacing a physical disk with a disk of a different size as data is not preserved. – Before reducing the size of a device, any volumes on the device should first be reduced in size or moved off the device.
- If the device that is being resized has the only valid configuration copy for a disk group, the -f option may be specified to forcibly resize the device.
- Resizing a device that contains the only valid configuration copy for a disk group can result in data loss if a system crash occurs during the resize.[/box]
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dm disk1 c4t9d0s2 - 2031232 - - - - dm disk2 c4t18d0s2 - 982672 - - - - # vxdisk -f -g testdg resize disk2 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dm disk1 c4t9d0s2 - 2031232 - - - - dm disk2 c4t18d0s2 - 2031232 - - - -
Removing disk from VxVM’s view
DEVICE TYPE DISK GROUP STATUS c3t1d0s2 auto:cdsdisk - - online c3t2d0s2 auto:cdsdisk - - online c4t14d0s2 auto:none - - online invalid c4t16d0s2 auto:none - - online invalid # vxdisk rm c4t14d0s2 DEVICE TYPE DISK GROUP STATUS c3t1d0s2 auto:cdsdisk - - online c3t2d0s2 auto:cdsdisk - - online c4t16d0s2 auto:none - - online invalid
Initiates the re-scanning of devices
DEVICE TYPE DISK GROUP STATUS c3t1d0s2 auto:cdsdisk - - online c3t2d0s2 auto:cdsdisk - - online # vxdisk scandisks DEVICE TYPE DISK GROUP STATUS c3t1d0s2 auto:cdsdisk - - online c3t2d0s2 auto:cdsdisk - - online c4t16d0s2 auto:none - - online invalid
You can also use the following to re-scan the disks.
# vxdisk scandisks new # vxdisk scandisks fabric # vxdisk scandisks ctlr=c1,c2 # vxdisk scandisks !device=c1t1d0,c2t1d0
Updates the unique disk identifier
# vxdisk updateudid c4t18d0s2 # vxdisk list c4t18d0s2 | grep -i udid udid: OPNFILER%5FVIRTUAL-DISK%5FDISKS%5FOPNFILERlEz1fa-xZaX-5wpw
Leave a Reply