Wednesday, May 11, 2011

Procedure to remove and rediscover ESS disk's

1) Bring down applications.

2) Bring down databases.

3) Unmount all filesystems.

4) Convert all vpath VGs to hdisk VGs

    a) lsvg -o | grep -v rootvg | xargs -n1 varyoffvg
    b) rm /tmp/vp2hd.out
    c) lsvg | grep -v rootvg | while read vg
        do
            vp2hd $vg >> /tmp/vp2hd.out
            echo $vg
        done
    d) Check contents of /tmp/vp2hd.out.  Ensure all VGs converted successfully.
    e) lsvg -o | grep -v rootvg | xargs -n1 varyoffvg #

5) Remove all vpath devices and take dpo down to "Defined" state

    a) lspv | grep vpath | awk '{print $1}' | xargs -n1 rmdev -dl
    b) rmdev -l dpo

6) Remove all FC hdisk devices and fscsi drivers; take FC adapters to "Defined" state

    a) lsdev -Cc driver | grep ^fscsi | awk '{print $1}' | xargs -n1 rmdev -dRl
    b) lsdev -Cc adapter | grep ^fcs | awk '{print $1}' | xargs -n1 rmdev -l

7) Make your SAN change

8) Rediscover all hdisk devices

    a) lsdev -Cc adapter | grep ^fcs | awk '{print $1}' | xargs -n1 cfgmgr -vl

# Or run this by hand one adapter at a time if you prefer

9) Verify all hdisk devices are present

    a) lspv
    b) lsdev -Cc disk

10) Fix queue_depth for all FC hdisks

    a) lsdev -Cc disk | grep 2105 | awk '{print $1}' | \
        xargs -n1 chdev -a queue_depth=20 -l

# NOTE: This will take a long time. We've seen ~45 minutes for about 600 disks

11) Recreate vpath devices

    a) cfgmgr -vl dpo

12) Verify all vpath devices are correct

    a) lsvpcfg
    b) datapath query device

13) Convert all hdisk VGs to vpath VGs

    a) rm /tmp/hd2vp.out
    b) lsvg | grep -v rootvg | while read vg
        do
            hd2vp $vg >> /tmp/hd2vp.out
            echo $vg
        done
    c) Check /tmp/hd2vp.out to ensure all VGs were converted successfully

# Volume groups have been left online by hd2vp

14) Mount all filesystems

15) Bring up databases.

16) Bring up applications

No comments:

Post a Comment