How to re-mirror rootvg after a migration installation on hdisk0

Submitted by Shyamkumar Chauhan

 

After confirmation from the Application and DBA teams that the application and databases are down the UNIX Administrators need to perform the following steps.

1) Remove the alternate i.e.old copy of rootvg altinst_rootvg to free hdisk1

2) Add hdisk1 to rootvg

3) Mirror the rootvg's hdisk0 with hdisk1

4) Create the boot device

5) Rebuild the bootlist

6) Add hdisk1 and hdisk0 to bootlist and reboot the server to disable the quorum

7) Check the status of server and check the boot log for any errors

8) Rearrange the bootlist with hdisk0 and hdisk1

9) Reboot with hdisk0

First complete a status check

Hostname:/:/> lspv
hdisk0          005db36d2f1e67e5                    rootvg          active
hdisk1          005db36d8792541c                    altinst_rootvg    active
Hostname:/> lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            542         337         109..08..03..108..109
Hostname:/:/> bootinfo -b
hdisk0
Hostname:/:/> lsvg
rootvg
altinst_rootvg
issvg
datavg

Now proceed with the activity:

Hostname:/:/> alt_rootvg_op -X altinst_rootvg   #This removes altinst_rootvg   ; hdisk1 is now accessable

Bootlist is set to the boot disk: hdisk0

Hostname:/:/> lsvg
rootvg
issvg
datavg
Hostname:/:/> lsvg -o
datavg
issvg
rootvg
Hostname:/:/> lspv
hdisk0          005db36d2f1e67e5                    rootvg          active
hdisk1          005db36d8792541c                    None
Hostname:/> extendvg -f rootvg hdisk1   #Add hdisk1 to rootvg; I had to use the -f force option
Hostname:/> lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            542         337         109..08..03..108..109
hdisk1            active            542         542         109..108..108..108..109
Hostname:/> mirrorvg rootvg
0516-1124 mirrorvg: Quorum requirement turned off, reboot system for this
       to take effect for rootvg.
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.
You have mail in /usr/spool/mail/root
Hostname:/> lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            542         337         109..08..03..108..109
hdisk1            active            542         353         109..24..03..108..109
Hostname:/> 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     32    64    2    open/syncd    N/A
hd8                 jfslog     1     2     2    open/syncd    N/A
hd4                 jfs        1     2     2    open/syncd    /
hd2                 jfs        101   202   2    open/syncd    /usr
hd9var              jfs        12    24    2    open/syncd    /var
hd3                 jfs        24    48    2    open/syncd    /tmp
hd1                 jfs        14    28    2    open/syncd    /home
hd10opt             jfs        2     4     2    open/syncd    /opt
dump_disk0          sysdump    16    16    1    open/syncd    N/A
lv01                jfs        1     2     2    open/syncd    /var/adm/perfmgr
Hostname:/> bosboot -a
Hostname: Boot image is 30577 512 byte blocks.
Hostname:/>  bootlist -m normal hdisk0 hdisk1
Hostname> bootlist -m normal hdisk1 hdisk0
Hostname> reboot
Hostname> bootinfo -b
hdisk1
Hostname:/> alog -o -t boot | less

Search for your disk (hdisk1 for me) in the boot log:

Hostname>  bootlist -m normal hdisk0 hdisk1
Hostname> reboot
Hostname> bootinfo -b
hdisk0