Sunday, May 4, 2008

AIX how to mirror rootdisk

server1:/ # lspv more
hdisk0 0024b7fafa266f89 old_rootvg
hdisk1 0024b7fafa266fbf rootvg active
hdisk2 0024b7fa1937be52 user128vg active
hdisk3 0024b7fa1937c5de user128vg active
server1:/ # alt_rootvg_op -X old_rootvg
server1:/ # extendvg rootvg hdisk0
0516-1398 extendvg: The physical volume hdisk0, appears to belong to another volume group. Use the force option to add this physical volume to a volume group.
0516-792 extendvg: Unable to extend volume group.
server1:/ # lspv more
hdisk0 0024b7fafa266f89 None
hdisk1 0024b7fafa266fbf rootvg active
hdisk2 0024b7fa1937be52 user128vg active
hdisk3 0024b7fa1937c5de user128vg active
server1:/ # extendvg -f rootvg hdisk0
server1:/ # lspv more
hdisk0 0024b7fafa266f89 rootvg active
hdisk1 0024b7fafa266fbf rootvg active
hdisk2 0024b7fa1937be52 user128vg active
hdisk3 0024b7fa1937c5de user128vg active
server1:/ #
server1:/ # mirrorvg rootvg hdisk0
0516-1804 chvg: The quorum change takes effect immediately.
0516-1126 mirrorvg: rootvg successfully mirrored, user should perform bosboot of system to initialize boot records. Then, user must modify bootlist to include: hdisk0 hdisk1.
server1:/ #
server1:/ # syncvg -v rootvg
server1:/ # bosboot -ad /dev/hdisk0
bosboot: Boot image is 35429 512 byte blocks.
server1:/ # bootlist -m normal hdisk0 hdisk1
server1:/ # lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 26 52 2 open/syncd N/A
hd8 jfslog 1 2 2 open/syncd N/A
hd4 jfs 2 4 2 open/syncd /
hd2 jfs 16 32 2 open/syncd /usr
hd9var jfs 15 30 2 open/syncd /var
hd3 jfs 2 4 2 open/syncd /tmp
hd1 jfs 2 4 2 open/syncd /home
usr_local jfs 40 80 2 open/syncd /usr/local
candlelv jfs 1 2 2 open/syncd /usr/candle
httpserver jfs 1 2 2 open/syncd /usr/HTTPServer
apps_apl jfs 1 2 2 open/syncd /apps/apl
hd10opt jfs 1 2 2 open/syncd /opt
apps jfs 2 4 2 open/syncd /apps
hd7 sysdump 3 3 1 open/syncd N/A
ca_uni jfs 2 4 2 open/syncd /ca_uni
syswork jfs 1 2 2 open/syncd /syswork
usr_ai_lv jfs 1 2 2 open/syncd /usr/ai
server1:/ # lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 546 428 106..35..69..109..109
hdisk0 active 546 431 109..35..69..109..109
server1:/ #shutdown -Fr