Replace a mirrored drive on AIX


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

Note: add'l steps required for bootable drives, I'm sure...

  #
  #  assumes you have figured out which hdisk has failed, usually from
  #  the errors it generated, and know where in the shelves it hides...
  #
  lspv -l hdisk--
  #
  #  want the LV NAMEs (eg loglv-- and fslv--)
  #  also note the MOUNT POINTs
  #
  lslv loglv--
  lslv fslv--
  #
  #  want the VOLUME GROUPs (eg ---vg)
  #
  lslv -l loglv--
  lslv -l fslv--
  #
  #  want the PVs (eg hdisk--), make sure ours is on the list
  #
  rmlvcopy fslv-- 1 hdisk--
  rmlvcopy loglv-- 1 hdisk--
  reducevg ---vg hdisk--
  #
  lsdev -C |grep hdisk
  rmdev -dl hdisk--      # takes a bit...
  lsdev -C |grep hdisk   # note disk is now gone
  #
  #  remove disk, insert new
  #
  cfgmgr                 # takes a bit...
  lsdev -C |grep hdisk   # note disk is now back
  #
  chdev -l hdisk-- -a pv=yes
  extendvg ---vg hdisk--
  mklvcopy fslv-- 2 hdisk--
  mklvcopy loglv-- 2 hdisk--
  #
  syncvg -l loglv--      # order doesn't matter, smallest first
  syncvg -l fslv--       # but, may take awhile


date: 10/02/2007