# vxdisksetup -i sdxxx
VxVM ERROR V-5-3-12153: Cant open device /dev/vx/dmp/sdxxx
VxVM vxparms ERROR V-5-5-6536 error reading partitions
VxVM vxdisksetup ERROR V-5-2-43 /dev/sdxxx : Invalid disk device for vxdisksetup
and
# vxdisk online sdyyy
VxVM vxdisk ERROR V-5-1-531 Device sdyyy :online failed
Disk in not useable, bad format.
pvremove, vgremove or lvremove fail to wipe the lvm label cleanly on a device so that LVM will no longer recognise it or leave disk in not useable state ,
1. precheck to ensure the removed devices are not part of an existing physical volumes or volume groups
# pvs ( Report information about physical volumes )
# vgs ( Report information about volume groups)
2. Check the currrent status of the device to be reused
# vxdisk list | egrep "DEVICE|LVM|error"
DEVICE TYPE DISK GROUP STATUS
sdxxx auto - - error sdyyy auto - - LVM
# vxdisk list sdxxx
..
flags: error private autoconfig
...
multipathing information:
sdxxx
# vxdisk list sdyyy
...
flags: LVM error private autoconfig
..
multipathing information:
sdyyy state enabled
3. check the status of the physical device
# fdisk -l /dev/sdxxx
.. ..
Disk /dev/xxxx doen't contain a valid partition table.
# fdisk -l /dev/sdyyy
.. ..
Disk /dev/yyy doen't contain a valid partition table.
No difference between the fdisk output for both device regardless of status=error/LVM
4. Add partition table for the disk with status=error
# fdisk /dev/sdxxx
o (create a new empty DOS parition table)
n (add a new partition) p (primary partition)
1 (partition number)
using default value 1 < carriage return>
Last cylinder < carriage return>
w
The partition table has been altered!
5. Update the OS of partition table changes and rescan vxvm
# partprobe --rereadpt /dev/xxxx
# vxdisk offline sdxxx
# vxdisk online sdxxx
6. check status and initailise
# vxdisk list emc0_xxxx | grep flags
flags online invalid
# /etc/vx/bin/vxdisksetup -i sdxxx
for device( sdyyy) with status=lvm , the above steps will fail on step 5 as follows:
# vxdisk online sdyyy
VxVM vxdisk ERROR V-5-1-531 Device sdyyy : online failed
Disk in not useable, bad format.
Workaround is to use "dd" to overwrite the LVM label before excuting step steps 4 and 5 above.
# dd if=/dev/zero bs=512 of=/dev/sdyyy count=1000