Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday 10 December 2013

How to removing altinst_rootvg, Extending the rootvg and then Mirror the rootvg in AIX


Note: This exercise was performed on AIX 5.2, there might be minor output difference in other OS levels, however  the concept is the same.

root@oldnim(/)#oslevel -s
5200-10-08-0930
root@oldnim(/)#

root@oldnim(/)#lspv
hdisk0          00c12ffee7862b3f                    rootvg          active
hdisk1          00cb3e2c91725817                    altinst_rootvg 
hdisk2          00c12ffe2fe2e448                    mprodvg         active
hdisk3          00c12ffe2fe315ed                    mprodvg         active
hdisk4          00c12ffe4aff8b39                    mprodvg         active
hdisk5          00c12ffe8f15ee8e                    backupvg        active
hdisk6          00c12ffe8f162162                    backupvg        active
root@oldnim(/)#

Attention: If you have created an alternate rootvg with alt_disk_install, but no longer wish to use it, or want to run alt_disk_install commands, do not run exportvg on altinst_rootvg. Simply run the alt_disk_install -X command to remove the altinst_rootvg definition from the ODM database. The reason you cannot run the exportvg command (or the reducevg command) is that the logical volume names and file systems now have the real names, and exportvg removes the stanza's for the real file system from /etc/filesystems for the real rootvg. 

root@oldnim(/)#alt_disk_install -X altinst_rootvg
Bootlist is set to the boot disk: hdisk0
root@oldnim(/)#

Verify that altinst_rootvg removed
root@oldnim(/)#lspv
hdisk0          00c12ffee7862b3f                    rootvg          active
hdisk1          00cb3e2c91725817                    None           
hdisk2          00c12ffe2fe2e448                    mprodvg         active
hdisk3          00c12ffe2fe315ed                    mprodvg         active
hdisk4          00c12ffe4aff8b39                    mprodvg         active
hdisk5          00c12ffe8f15ee8e                    backupvg        active
hdisk6          00c12ffe8f162162                    backupvg        active
root@oldnim(/)#

Add hdisk1 to rootvg now
root@oldnim(/)#extendvg rootvg hdisk1
0516-1398 extendvg: The physical volume hdisk1, 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.
root@oldnim(/)#

root@oldnim(/)#extendvg -f rootvg hdisk1
root@oldnim(/)#

Verify
root@oldnim(/)#lspv
hdisk0          00c12ffee7862b3f                    rootvg          active
hdisk1          00cb3e2c91725817                    rootvg          active
hdisk2          00c12ffe2fe2e448                    mprodvg         active
hdisk3          00c12ffe2fe315ed                    mprodvg         active
hdisk4          00c12ffe4aff8b39                    mprodvg         active
hdisk5          00c12ffe8f15ee8e                    backupvg        active
hdisk6          00c12ffe8f162162                    backupvg        active
root@oldnim(/)#

Now mirror the root volume group
root@oldnim(/)#mirrorvg -S -m rootvg hdisk1
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.
root@oldnim(/)#
Where -S Background Sync and –m exact map

root@oldnim(/)#lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            546         310         88..00..04..109..109
hdisk1            active            546         343         88..20..17..109..109
root@oldnim(/)#

Current bootlist
root@oldnim(/)#bootlist -m normal -o
hdisk0 blv=hd5
root@oldnim(/)#

Add hdisk1 in the current bootlist as well
root@oldnim(/)#bootlist -m normal -o hdisk0 hdisk1
hdisk0 blv=hd5
hdisk1
root@oldnim(/)#

Create boot image on hdisk1
root@oldnim(/)#bosboot -ad hdisk1

bosboot: Boot image is 24050 512 byte blocks.
root@oldnim(/)#

Verify the current boot list again
root@oldnim(/)#bootlist -m normal -o
hdisk0 blv=hd5
hdisk1 blv=hd5
root@oldnim(/)#

Done


No comments:

Post a Comment