Replace a mirrored drive on HPUX


From the department of notes I need once a year, with luck :-)

Note: add'l steps required for bootable drives!!!

  lvreduce -m 0 /dev/vg--/lvol-- /dev/dsk/c-t-d0      # 0 "mirrored" copies
  vgreduce -l /dev/vg-- /dev/dsk/c-t-d0               # remove disk from vg
  pvremove /dev/rdsk/c-t-d0                           # note RDSK not DSK
  #  ...now safe to swap disks...
  ioscan -fnC disk                                    # rescan scsi busses
  pvcreate -f /dev/rdsk/c-t-d0                        # -f in case it's "new"
  vgextend /dev/vg-- /dev/dsk/c-t-d0                  # back into the vg
  lvextend -m 1 /dev/vg--/lvol-- /dev/dsk/c-t-d0      # 1 "mirrored" copy
  #  ...plan to wait on this last bit awhile...


date: 08/13/2007