Remove the disk online

Hi

I have one of the disk missing in my NIMVG. My doubt is can I remove this hdisk2 online ? few of the file systems seems to be spread over 7 PV's. that's why i'm worried. Can someone suggest if I can replace this disk online. Also how to check if there is some data present in hdisk2 alone which is not mirrored to the other disks.

ibmaixnim:root:/>lsvg -l NIMVG
NIMVG:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
loglv00             jfs2log    1       2       2    open/stale    N/A
fslv00              jfs2       441     882     7    open/stale    /export
fslv01              jfs2       186     372     7    open/stale    /export/Software
imagevol            jfs2       367     367     1    open/syncd    /export/images


ibmaixnim:root:/>lsvg -p NIMVG
NIMVG:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk2            missing           546         0           00..00..00..00..00
hdisk3            active            546         0           00..00..00..00..00
hdisk15           active            399         8           00..00..00..00..08
hdisk21           active            23          0           00..00..00..00..00
hdisk22           active            23          0           00..00..00..00..00
hdisk23           active            23          0           00..00..00..00..00
hdisk24           active            25          0           00..00..00..00..00
hdisk25           active            23          0           00..00..00..00..00
hdisk26           active            23          0           00..00..00..00..00


ibmaixnim:root:/>lspv -l hdisk2
hdisk2:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
fslv00                401     401     110..108..109..73..01 /export
fslv01                144     144     00..00..00..36..108   /export/Software
loglv00               1       1       00..01..00..00..00    N/A

ibmaixnim:root:/>lsdev -Cc disk | grep -i hdisk2
hdisk2  Available 05-08-00 SAS Disk Drive

The disk is already listed "missing", so it is effectively already removed, as far as the volume group is concerned. Yes, you can remove the disk physically too now. Use normal hot-swap-procedures to do so.

As far as i can tell your LVs are mirrored, so as long as you have mirrored correctly (that is: of the 2 copies of each LP there is only one on the missing disk, not both) you can remirror your VG without any data loss. Use normal disk replacement procedures:

  • Issue "lspv" to list your currently attached disks. Save this information.
  • (Physically) Attach the new disk to the system. Run "cfgmgr" to make the disk known.
  • Use "lspv" to find out which hdiskX-device is the new one. Compare this with the information previously saved in 1.).
  • Issue "replacepv" to replace the disk:
    text replacepv hdiskold hdisknew

  • Check the "STALE PARTITIONS" count in "lsvg", it will eventually drop to zero, which means the process finished. Then
  • Remove the missing disk from the system configuration:

    text rmdev -dl hdiskold


    Notice that "replacepv" will already have moved the disk out of the PV.

I hope this helps.

bakunin

lsvg -M NIMVG | grep hdisk2
-M
Lists the following fields for each logical volume on the physical volume:
PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]]

If you mirrored correctly each LV should have only one Mirror number (Copynum) on this hdisk.

Maybe You can use the following command - I could not test it here:
Each LV should be output only once.

lsvg -M NIMVG | grep -w hdisk2 | awk '{print $2}' | awk -F: '{print $1":"$3}' | sort -du