# vxreattach -c
VxVM vxdisk ERROR V-5-1-531 Device
Bad record name
VxVM vxdisk ERROR V-5-1-558 Disk
As the disk to be recovered contains the hostid from a different host, the vxreattach operation will fail until the offending hostid is cleared for the failed disk.
# vxdisk clearimport
An alternate method is to deport the impacted diskgroup, then re-import it using "vxdg -Cf import
The vxdg -C option will ensure the "hostid" stored on the related disks are cleared prior to importing the diskgroup.
The vxdg -f option will force import the diskgroup, regardless of any disk related issues during the import process, ie a disk is an accessible at the time of the import.
Scenario
EMC SRDF is used to replicate the disk contents from host "A" to host "B". The SRDF pairing's are split, enabling the replicated diskgroup image from host "A" to be imported on host "B".
During the import process, a selection of disks fail during the initial import process on host "B".
Subsequent attempts to reattach the failed devices back into the diskgroup fail as shown below.
The impacted devices presented to host "B" are showing a hostid that of host "A". Once the hostid value is cleared in relation to the impacted devices, the failed devices can be associated back into the corresponding diskgroup.
The following two EMC SRDF disks are reported as failed was, and cannot be associated back into the diskgroup "data_dg", until the hostid is cleared for both disks.
# vxdisk -o alldgs list | grep datadg_dg
c1t5006048C52A5CA2Cd131s2 auto:cdsdisk EMC0_1 data_dg online
c1t5006048C52A5CA2Cd132s2 auto:cdsdisk EMC0_2 data_dg online
c1t5006048C52A5CA2Cd133s2 auto:cdsdisk - (data_dg) online <<<< hostid refers to host "A"
c1t5006048C52A5CA2Cd134s2 auto:cdsdisk - (data_dg) online <<<< hostid refers to host "A"
- - EMC0_3 data_dg failed was:EMC0_3
- - EMC0_4 data_dg failed was:EMC0_4
# vxdisk clearimport c1t5006048C52A5CA2Cd133s2
# vxdisk clearimport c1t5006048C52A5CA2Cd134s2
# vxreattach EMC0_3
# vxreattach EMC0_4
To recover the volumes within diskgroup "data_dg", type:
# vxrecover -g data_dg -bs
Method #1
Clear the hostid for a given disk using "vxdisk clearimport
# vxdisk clearimport
Method #2
Clear the hostid by deporting and re-importing the impacted diskgroup.
# vxdg -Cf import