Mirrored rootvg Will Not Vary On After a LUN Loss
An AIX 7.2 LPAR has rootvg mirrored across two 300 GB SAN LUNs, hdisk0 and hdisk1, created with mirrorvg using default options. bootlist -m normal lists both disks and bosboot has been run on each. During a fabric upgrade the storage team removes and re-adds the zoning for the array port serving hdisk1; the LUN returns with a different identity, so cfgmgr creates hdisk2 and leaves hdisk1 in a missing state. The on-call operator reboots the LPAR to 'clear the errors'. The system halts before init and drops to the repair prompt reporting that rootvg cannot be varied on. hdisk0 is healthy and holds a complete copy of every logical volume. The application is down, the change window closes in 90 minutes, and the storage team confirms the original LUN mapping is intact and reachable.
1. Why did the boot fail when hdisk0 contains a complete, current mirror of every logical volume?
Read the worked answer
Because the volume group lost quorum, and rootvg must be varied on before anything else can start. A VG created with more than one physical volume has quorum enabled by default. Each PV carries a copy of the VGDA, and AIX requires that a majority of those copies be available before the VG can be varied on normally. With two PVs, a majority means both: each disk holds 50 percent of the VGDA copies, and 50 percent is not a majority. Losing hdisk1 therefore makes rootvg unvaryable even though every LP exists on hdisk0 and the mirror is intact.
The same rule is why single-disk VGs do not hit this: quorum is automatically disabled when the VG has only one PV. It is also why a three-disk VG survives the loss of one disk but a two-disk VG does not. Nothing is wrong with the data on hdisk0; the VG metadata arbitration is what stopped the boot, and that distinction is what tells you a forced varyon is safe here rather than reckless.
2. Give the ordered recovery you would run in the repair shell to get the LPAR booting from hdisk0 within the window, and state why each step is in that order.
Read the worked answer
- Force the varyon from the repair shell:
varyonvg -f rootvg. The-ftells AIX to vary on without quorum; it is safe here because hdisk0 holds a complete copy and the failed PV is confirmed missing rather than merely slow. - Remove the dead PV from the VG definition:
reducevg rootvg hdisk1. This deletes the stale VGDA copy and the mirror copy that points at a device that no longer exists. If AIX objects because the device is missing, remove the definition withrmdev -dl hdisk1and repeat the reducevg. - Disable quorum so a repeat event does not block boot:
chvg -Qn rootvg. - Rebuild the boot image on the surviving disk:
bosboot -ad /dev/hdisk0. Do this after the VG is consistent, so the BLV reflects the current LV map and the correct boot logical volume. - Fix the boot list to the only working disk:
bootlist -m normal hdisk0(check withbootlist -m normal -o), then reboot.
Running bosboot before the reducevg would write a boot image against a VG map that still references a missing disk, which is exactly the kind of half-finished state that turns a 20-minute recovery into a restore.
3. hdisk2 is the re-presented LUN. Outline how you return rootvg to a two-disk mirror safely, and what permanent setting you change on two-disk rootvg builds.
Read the worked answer
Do not extend rootvg with hdisk2 until you know what it is. Run cfgmgr -v, then lsdev -Cc disk and lspv to see whether hdisk2 is Available with a PVID and whether that PVID is the same one hdisk1 had. If hdisk2 carries the old PVID and stale mirror copies, extendvg will refuse it or, worse, you will end up with two devices claiming copies of the same LVs. The clean path is to clear the stale identity (rmdev -dl hdisk2 and rescan, or chdev -l hdisk2 -a pv=clear after confirming nothing else uses it), then extendvg rootvg hdisk2, mirrorvg rootvg, bosboot -ad /dev/hdisk2, and finally bootlist -m normal hdisk0 hdisk2.
Verify with lslv -m on a few LVs and lsvg -p rootvg before closing the window, and run syncvg -v rootvg so any stale regions are resynchronised.
The permanent setting is quorum: for any rootvg built on exactly two PVs, run chvg -Qn rootvg as part of the build. It costs nothing while both disks are healthy and converts a double failure into a single-disk outage. Keep bosboot current on every rootvg disk and keep both entries in the boot list, otherwise the boot list becomes the next single point of failure.