Question
========
During mirror operation in LVM how can I check what partitions still have to be synced?

Answer
======
1. Check what logical volumes are in the volume group, and which ones are stale.

The “-L” option will allow viewing of LVM information even though the volume group may be locked due to ongoing changes. However, the information returned by using the “-L” option may not be completely updated or correct.

$ lsvg -l -L miketestvg
miketestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
fslv00 jfs2 480 960 2 open/stale /mike1

2. For a given stale logical volume you are interested in, see what physical volumes it’s on.

$ lslv -L -l fslv00
fslv00:/mike1
PV COPIES IN BAND DISTRIBUTION
hdisk5 480:000:000 45% 000:216:216:048:000
hdisk4 480:000:000 0% 217:000:000:168:095

Check that physical volume to find out what stale partitions are on it:

$ lspv -M -L hdisk4
hdisk4:1 fslv00:1:2
hdisk4:2 fslv00:2:2
hdisk4:3 fslv00:3:2
hdisk4:4 fslv00:4:2

hdisk4:791 fslv00:311:2
hdisk4:792 fslv00:312:2
hdisk4:793 fslv00:313:2 stale
hdisk4:794 fslv00:314:2 stale
hdisk4:795 fslv00:315:2 stale
hdisk4:796 fslv00:316:2 stale
hdisk4:797 fslv00:317:2 stale

Note the columns in the above output:
PV name : PP number LV name : LP number : copy number state

Advertisements