After VxVM Storage Array Migration, vxdg rmdisk Fails with Error V-5-1-10127

book

Article ID: 1000766248

calendar_today

Updated On:

Description

When attempting to remove old disk from a disk group, the command fails with the following specific error:

vxdg -g <DG> rmdisk <disk>

VxVM vxdg ERROR V-5-1-10127 disassociating disk-media <disk>:
Cannot remove last disk group log copy

Note : diskX is from old storage, diskY is from new storage. All the Volumes are mirrored from diskX to diskY and volume records on diskX are already removed.

If diskY has invalid log copy, vxvm will not allow you to remove diskX.

Cause

Infoscale Volume Manager requires a valid disk group configuration copy and log (DG LOG) to maintain the integrity of the disk group metadata. This error occurs because <disk> holds the last remaining active copy of the Disk Group Configuration Log for <DG>. 

The vxdg list <DG> output confirms that the log copy on the new disk  is marked as invalid. Because the old disk holds the only valid/clean configuration log copy in <DG>, VxVM safely blocks its removal to prevent complete metadata loss.

log disk <diskX> copy 1 len=825

log disk <diskY> copy 1 len=7697 invalid  <<<< 

 
 
 
 
 

Resolution

 We have to add diskZ from new storage, mirror the volume to diskZ, remove both the disks diskX,diskY

i) Initialize another new disk (from NEW STORAGE) and add disk to DG
#vxdisksetup -i <diskZ>
#vxdg -g <DG> adddisk <DM NAME>=<diskZ>


ii) Ensure the log copy is valid for that new disk.
# vxdg list <DG>  <- This should not show "invalid" info for log disk against new disk.


iii) Validate the configuration and log copy from the new disk is same as old disk by running below command and comparing it.
# /etc/vx/diag.d/vxprivutil dumplog /dev/vx/rdmp/<diskZ>
# /etc/vx/diag.d/vxprivutil dumpconfig /dev/vx/rdmp/<diskZ>

iv) Once the validation shows the new disk has valid log copy , you should mirror volumes to that new disk and remove the volume from old disks and remove the disks from DG
#vxassist -g <DG> -b mirror <VOLUME> <diskZ>
#vxtask list 
#vxassist -g <DG> remove mirror <VOLUME> <diskY>
#vxdg -g <DG> rmdisk <diskY>

#vxdg -g <DG> rmdisk <diskX>

Issue/Introduction

After migrating storage from an old storage array (diskX) to a new array (diskY) using VxVM mirroring (vxassist mirror), removing the old array disks (diskX) via vxdg rmdisk fails with VxVM vxdg ERROR V-5-1-10127: Cannot remove last disk group log copy.