LVMRECNMTCH problem during varyonvg on AIX
Have you ever encountered the following error on AIX?
# varyonvg testvg PV Status: hdisk1 000af0ffc5f038cb PVACTIVE hdisk2 000af0ffc254e591 LVMRECNMTCH 0516-056 varyonvg: The volume group is not varied on because a physical volume is marked missing. Run diagnostics.
In my case, the testvg had two disks and all the filesystems were mirrored. So, a copy of mirrors on hdisk1 were corrupted. How can we solve this problem? How can we varyonvg and mount the filesystems again?
To varyon the testvg again we just need to force the varyonvg using the following command:
# varyonvg -f testvg
Using the -f flag in varyonvg command allows a volume group to be made active that does not currently have a quorum of available disks. All disks that cannot be brought to an active state will be put in a removed state. At least one disk must be available for use in the volume group.
Now that the testvg is varied on we can mount all the filesystems:
# mount -a
For mirroring the testvg again, we can use the following scenario:
# unmirrorvg testvg hdisk1 # reducevg testvg hdisk1 # rmdev -dl hdisk1
Now replace the disk drive hdisk1, if it is corrupted, then let the newly added drive be renamed hdisk1. Then do the following:
# extendvg testvg hdisk1 # mirrorvg testvg