– vxdiskunsetup command is used to remove the vxvm configuration from the disk. Its works the opposite way of the command vxdisksetup.
– vxdiskunsetup command remove the public and private regions created by the command vxdisksetup command.
– vxdiskunsetup command turns the disk flags from online to error.
check the options available in the vxdiskunsetup command :
# /etc/vx/bin/vxdiskunsetup -h VxVM vxdiskunsetup INFO V-5-2-6407 vxdiskunsetup - remove a disk from use by the volume manager Usage: vxdiskunsetup [-C] [-f] [-o shred[=1|3|7]] device ... Options: -C Clear import locks -o shred[=1|3|7] Shred user data on the disk using 1, 3 or 7 pass overwrite Defaults to 1-pass overwrite if none is specified. -f Forceful operation. When used with the shred operation, allows shredding of SSD disks.
Disk status (emc0_caca) before vxdiskunsetup :
DEVICE TYPE DISK GROUP STATUS disk_0 auto:none - - online invalid disk_1 auto:LVM - - online invalid emc0_caca auto:cdsdisk - - online
Disk Status after vxdiskunsetup
DEVICE TYPE DISK GROUP STATUS disk_0 auto:none - - online invalid disk_1 auto:LVM - - online invalid emc0_caca auto:none - - online invalid
Examples
Here are few examples,
1. To perform a basic vxdiskunsetup with -C option which remove any host locks presents and forces the de-configuration of the disk :
# /etc/vx/bin/vxdiskunsetup -C emc0_caca
2. To perform a vxdiskunsetup on a disk that is member of a deported disk group :
# /etc/vx/bin/vxdiskunsetup -f emc0_caca
3. You can also overwrite the datab on the disk while doing the vxdiskunsetup, e.g. shred the disk with 3 passes :
# /etc/vx/bin/vxdiskunsetup -o shred=3 emc0_caca