AIX 5L SysAdmin II: (Unit 05) – Disk Management Theory (Part 3 of 3)

Physical Partitions on different Physical Volumes

Logical Partitions
Mirrored Logical Volume

LP: PP1: PP2: PP3:
5 hdisk0,5 hdisk1,8 hdisk2,9

Mirroring – Multiple copies of the same data in case of hardware failure.

Stale Partitions:
After repair of hdisk2
– varyonvg VGName (calls syncvg -v VGName)
– Only stale partitions are updated

Creating Mirrored LVs (smit mklv)
Add a Logical Volume

Scheduling Policies: Sequential:
– Second physical write operation is not started unless the first has completed successfully
– In case of a total disk failure there is always a “good copy”
– Increases availability, but decreases performance
– In this example the write operation takes 12ms

Scheduling Policies: Parallel:
– Write operations for physical partitions starts at the same time:
Whe the longest write (8 ms) finshes, the write operation is complete
– Improves performance (especially Read-Performance)

Mirror Write Consistancy (MWC):
– Parallel scheduling policy and…
– …system crashes before the write to all mirrors have been completed
– Mirrors of the logical volume are in an inconsistent state

Solution: Mirror Write Consistency
– Allows identifying the correct physical partition after reboot
– Separate area of each disk (outer edge)
– Place logical volumes with mirror write consistancy on the outer edge

Adding Mirrors to Existing LVs (mklvcopy):
Add copies to a Logical Volume

Mirroring rootvg:
– Make a copy of all rootvg LVs via mklvcopy and place copies on the second disk
– Execute bosboot and change your bootlist

1. extendvg – (Make sure you have enough disk space, add a second drive)
extendvg rootvg hdisk1
2. chvg -Qn – (disable Quorum since the data is duplicated on two different physical volumes
Note: Quorum verifies the VGDAs copies so that 51% are working.
3. mklvcopy – (Make copies of all LVs on rootvg)
4. syncvg – (Synchronize the copies)
5. bosboot – (enable both copies of rootvg to be bootable)
6. bootlist – (Update the bootlist with the new hdisk1)
7. shutdown -Fr

Note: rootvg should be mirrored.

Mirroring Volume Groups (mirrorvg):
For rootvg, you need to execute:
– bosboot (To make sure it is bootable whenever you work with the LVM)
– bootlist -m normal …

VGDA Count:
Volume Group: PV1, PV2
Loss of PV1: Only 33% VGDAs available: No quorum
Loss of PV2: 66% of VGDAs available: Quorum
Note: PV1 has two VGDAs, others only have one VGDA each

Volume Group: PV1, PV2, PV3
Loss of one PV: 66% of VGDAs still available: Quorum

If hdisk1 fails, datavg has no quorum
– VG not active – # varyonvg datavg (Fails!!!)
– VG active – Closed during operation:
No more access to LVs
LVM_SA_QUORCLOSE in error log

Nonquorum Volume Groups:
With single mirroring, always disable the quorum:
– chvg -Qn datavg
– varyoffvg datavg
– varyonvg datavg

Additional considerations for rootvg:
– chvg -Qn rootvg
– bosboot -ad /dev/hdiskX
– reboot

– Turning off the quorum does not allow a normal varyonvg without a quorum
– It prevents closing the volume group when losing the quorum

Forced Varyon (varyonvg -f)
# varyonvg datavg – Fails!!! (even when quorum disable)

Check the reason for the failure (cable, adapter, power), before doing…

# varyonvg -f datavg
Failure accessing hdisk1, Set PV STATE to removed.
Volume group datavg is varied on.

lspv hdisk10

Physical Volume States:
varyonvg VGName

Quorum Ok? – missing – Hardware Repaire
Quorum lost? –
varyonvg -F VGName
Hardware – Repair folled by:
varyonvg VGName
chpv -v a hdiskX

Create a mirror of rootvg
lspv – Find physical volumes
lspv -l hdisk0 – Find logical volumes
lspv -l hdisk1 – Not assigned to a volume group
extendvg rootvg hdisk1 – Add hdisk1 to rootvg
lsvg -p rootvg – Verify changes
lspv -l hdisk1 – Nothing on that physical volume
chvg -qn rootvg – Disable quorum to begin mirroring process
mklvcopy hd1 2 hdisk1 – Create a mirrored copy /home
mklvcopy hd2 2 hdisk1 – Copy
mklvcopy hd3 2 hdisk1 – Copy
mklvcopy hd4 2 hdisk1 – Copy root filesystem /
mklvcopy hd5 2 hdisk1 – Copy BLV – Boot Logical Volume
mklvcopy hd6 2 hdisk1 – Copy Paging Space
mklvcopy hd8 2 hdisk1 – Copy JFS Log
mklvcopy hd9var 2 hdisk1 – Copy var filesystem /var
mklvcopy hd10opt 2 hdisk1 – Copy opt filesystem /opt
lspv -l hdisk1 – Verify copies
lspv -l hdisk0 – Compare hdisk1 and hdisk0 are the same

mirrorvg -s rootvg – (This command would do all copy commands above instead of doing it manually)

lsvg rootvg – Display status of the volume group
syncvg -v rootvg – Sync the mirrored copy on hdisk1
lsvg rootvg – Verify stale partitions corrected

bosboot -a – Make both BLV bootable
lspv – Verigy both disks are active and on rootvg

/home/workshop/ex6_diskfailure – Simulate disk failure

smitty errpt – Look at error report
Change Report Type to “detailed”
Press Enter – Displays multiple errors with stale partitions
Press F10 = Exit

lspv hdisk0 – PV State: Active
lspv hdisk1 – PV State: removed
Note: Solution covered in Student Notes Unit 5 Part 3 at the end

varyonvg rootvg –
unable to synchronize errors…..
lspv hdisk1 – PV State: removed
chpv -v a hdisk1 – Bring back to an active state
Warning: the PV hdisk1 has open logical volumes
lspv hdisk1 – PV State: active
lsvg rootvg – Stale PVs: 1, Stale PPs: 14
varyonvg rootvg – To solve stale partition issue
also runs the syncvg command
lsvg rootvg – Verify stale partitions resolved

unmirrorvg rootvg hdisk1
normal errors
lspv -l hdisk1 – No copies of logical volume now
chpv -c hdisk1 – Must run to clean the boot sector
bosboot -ad /dev/hdisk0 – After working with the BLV run bosboot so the OS will look on hdisk for the BLV
bootlist -m normal hdisk0 – Assign hdisk0 to the bootlist

Mirror all logical volumes except hd2 assuming that hdisk1 is not as big as the hdisk0.
lspv -l hdisk1 – Verify that hdisk1 is empty
chvg-Qn rootvg – Turn off Quorum
mklvcopy hd1 2 hdisk1
mklvcopy hd3 2 hdisk1
mklvcopy hd4 2 hdisk1
mklvcopy hd5 2 hdisk1
mklvcopy hd6 2 hdisk1
mklvcopy hd8 2 hdisk1
mklvcopy hd9var 2 hdisk1
mklvcopy hd10opt 2 hdisk1
lsvg rootvg – Display status of the volume group (stale partitions)
syncvg -v rootvg – synchronize the volume group
lsvg rootvg – Verify no stale PVs or PPs
bosboot -a – Make both PVs bootable
lspv hdisk0 – Verify PV state:active
lspv hdisk1 – Verfiy PV state:active
Pause lab…

Other question:
Error in log – LVM_SA_QUORCLOSE
The non-root volume group datavg has been closed by LVM.
The non-root volume group consists of two mirrored disks.
What is the fastest way to bring the non-root volume group online?
varyon datavg -F
chpv -v
varyon datavg

Continue lab…
lspv -l hdisk0
lspv -l hdisk1 – All there except hd2 which was not mirrored
unmirrorvg rootvg hdisk1 – unmirror the volume group
chpv -c hdisk1 – clean the boot record of hdisk1
lspv -l hdisk1 – Verify it is clean
bosboot -ad /dev/hdisk0 – Remind OS that only hdisk0 is bootable
Boot image is created
bootlist -m normal hdisk0 – Set bootlist to hdisk0

Leave a Reply

Your email address will not be published. Required fields are marked *