How to change the state of a hdisk from PV STATE missing to active

If you can see that a hdisk is flagged as missing in a volume group and yet you know that the disk is fine then this procedure may help to get things running again.

You may get this problem for example if you temporarily or accidentally removed a LUN that was mapped to a host. If you then re-present this LUN back to the host you will see it as missing within the volume group.

In this example the missing hdisk was part of a mirrored pair and made the LV state stale.

To see the hdisk flagged as missing, type the following.

lsvg -p appvg

appvg:
PV_NAME           PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk8            active      599         0           00..00..00..00..00
hdisk9            missing     599         0           00..00..00..00..00

Here we can see that hdisk9 is missing.

To see the logical volume states of the volume group, type the following.

lsvg -l appvg

appvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
applv          	    jfs        598   1196  2    open/stale    /app
loglv00             jfslog     1     2     2    open/stale    N/A

Here we can see the two logical volumes in appvg are stale.

OK to make the missing hdisk active again type the following.

varyonvg appvg

Have a look at the hdisk again.

lsvg -p appvg

appvg:
PV_NAME           PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk8            active      599         0           00..00..00..00..00
hdisk9            active      599         0           00..00..00..00..00

We can see that hdisk9 is now active

To remove the stale state from the LVs we need to resync the volume group.

To resync the volume group, in this case we can type either of the following.

To synchronize the physical partitions located on physical volumes hdisk8 and hdisk9, type:

syncvg -p hdisk8 hdisk9

To synchronize all physical partitions from volume group appvg, type:

syncvg -v appvg