Fix VG varyon failure due to missing PVID issue in AIX:
1: Identify PV and VG info
# lspv | grep <vgname>
# lsvg | grep <vgname>
Locate the problematic PV (e.g., hdiskX) belonging to your VG.
2: Check VG info on the PV
# lqueryvg -p hdiskX -Atv
# readvgda -V3 hdiskX
Verify if the PV has a PVID & VG has VGDA & LV assigned or if it's missing.
3: Export the VG
# exportvg appsvg
4: Clear PV attributes and remove device
# chdev -a pv=clear -l hdiskX
# rmdev -dl hdisk11
# cfgmgr
This clears the PV label and removes the device cfgmgr rescans and re-adds the device.
5: Recreate VG on the PV
# recreatevg -y <vgname> hdiskX
This command creates a new VG on the disk.
6: Rename Logical Volumes and Filesystems
# cp /etc/filesystems /etc/filesystems.bkp
# chlv -n <New_LV_name> <Old_LV_name>
# chfs -m <New_Mount_Point> <Old_Mount_Point>
Update LV names and filesystem mount points as needed.
7: Mount all filesystems in the VG with this script
# for i in $(lsvg -l <vgname> | grep jfs2 | grep -v jfs2log | awk '{print $7}' | grep -v N/A)
do
mount $i
done
Replace <vgname> with your VG name.
This mounts all JFS2 filesystems excluding logs.
Summary:
- Missing PVID causes VG vary on failure.
- Clear PV info, remove device, recreate VG.
- Rename LVs and filesystems if needed.
- Mount filesystems using a simple script.
No comments:
Post a Comment