n a perfect world....rootvg would always reside on hdisk0

In a perfect world, 99.9% of AIX administrators would prefer their systems to look like this:

 

# lspv | grep rootvg

hdisk0         00c342c68dfcbdfb                    rootvg         active

 

However, in reality, 99.9% of AIX administrators live with systems that look something like this:

 

# lspv | grep rootvg

hdisk39         00c342c68dfcbdfb                    rootvg         active

 

And 99.9% of them don’t have time to tidy up their systems so that rootvg resides on hdisk0.

 

Most of them have much bigger fish to fry, such as performance, virtualisation, automation, security, project delivery, TPS reports, etc!

 

If they did have time, they could use the mirrorvg and rendev commands to ‘bring order to the Universe’.

 

WARNING! Let me make this perfectly clear! The procedure that is shown below is NOT SUPPORTED by IBM. If you choose to follow these procedures, DO NOT contact IBM support for help. They will not be able to assist you. YOU HAVE BEEN WARNED!

Note: Disk drive devices that are members of the root volume group, or that will become members of the root volume group (by means of LVM or install procedures), must not be renamed. Renaming such disk drives may interfere with the ability to recover from certain scenarios, including boot failures. Some devices may have special requirements on their names in order for other devices or applications to use them. Using the rendev command to rename such a device may result in the device being unusable.

Note: To protect the configuration database, the rendev command cannot be interrupted once it has started. Trying to stop this command before completion, could result in
a corrupted database. 

 

  1. Add a new disk to the system.

# lspv

hdisk39         00c342c68dfcbdfb                    rootvg         active

hdisk40         00c342c6161c6b47                    None

 

  1. Rename the new disk to hdisk0.

# rendev -l hdisk40 -n hdisk0

hdisk0

 

  1. Add the disk to rootvg and mirror to it.

# extendvg rootvg hdisk0

# 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 hdisk39.

 

  1. Create a boot image on hdisk0.

# bosboot –a –d /dev/hdisk0

bosboot: Boot image is 49180 512 byte blocks.

# ipl_varyon -i

[S 3670248 14942228 07/24/12-10:18:11:104 ipl_varyon.c 1270] ipl_varyon -i

PVNAME         BOOT DEVICE     PVID                    VOLUME GROUP ID

hdisk39         YES             00c342c68dfcbdfb0000000000000000        00c342c600004c00

hdisk0         YES             00c342c6161c6b470000000000000000        00c342c600004c00

[E 3670248 0:087 ipl_varyon.c 1410] ipl_varyon: exited with rc=0

 

  1. Check and update the bootlist. Ensure hdisk0 is in the bootlist.

# bootlist –m normal hdisk0

# bootlist –m normal –o

hdisk0 blv=hd5 pathid=0

hdisk0 blv=hd5 pathid=1

 

  1. Unmirror rootvg on hdisk39. Remove hdisk39 from rootvg.

# unmirrorvg rootvg hdisk39

0516-1246 rmlvcopy: If hd5 is the boot logical volume, please run 'chpv -c <diskname>'

       as root user to clear the boot record and avoid a potential boot

       off an old boot image that may reside on the disk from which this

       logical volume is moved/removed.

0516-1804 chvg: The quorum change takes effect immediately.

0516-1144 unmirrorvg: rootvg successfully unmirrored, user should perform

       bosboot of system to reinitialize boot records. Then, user must modify

       bootlist to just include: hdisk0.

# lspv –l hdisk39

#

# reducevg rootvg hdisk39

#

 

  1. Order in the Universe has been restored.

# lspv | grep rootvg

hdisk0         00c342c6161c6b47                    rootvg         active

 

Of course, all of this assumes that the name, hdisk0, is not already in use by a hdisk in another volume group on the system.

Again, if you have the time, then you could perform the following to rectify the situation.

 

  1. datavg resides on hdisk0.

# lspv | grep datavg

hdisk0         00c342c6161c6b47                    datavg         active

 

  1. Unmount all data file systems in this volume group. Varyoff the VG.

 

# unmount /datafs

# varyoffvg datavg

 

 

  1. Rename hdisk0 to hdisk99 (or something other than hdisk0).

# rendev -l hdisk0 -n hdisk99

hdisk99

 

  1. Varyon the volume group, datavg. Mount the data file systems in datavg.

# varyonvg datavg

# mount /datafs

 

  1. datavg now resides on (the newly renamed) hdisk99.

# lspv | grep datavg

hdisk99         00c342c6161c6b47                    datavg

 

Now that the name, hdisk0, is free, you can perform the steps, outlined above, to restore ‘Order in the Universe’ and put rootvg back on hdisk0!

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
AIX check the HBA status
Viewed 16895 times since Tue, May 22, 2018
AIX NTP Client configuration
Viewed 12290 times since Tue, Jul 17, 2018
AIX Creating a Volume Group
Viewed 2656 times since Tue, Jul 17, 2018
AIX: Error code 0516-1339, 0516-1397 0516-792: cannot extendvg with a previous Oracle ASM disk
Viewed 3899 times since Wed, Feb 6, 2019
AIX boot proccess
Viewed 3252 times since Tue, Apr 16, 2019
Technology level update on AIX using smit_update and alt_disk_install method
Viewed 5987 times since Sun, Jun 30, 2019
How to Easily Generate AIX Systems Management Reports
Viewed 3126 times since Wed, May 30, 2018
How to check VLAN ID number on AIX?
Viewed 14060 times since Mon, May 28, 2018
Troubleshooting Starts With Understanding Your Physical Disks’ Attributes
Viewed 4000 times since Sat, May 19, 2018
How to build a NIM Server on AIX 6.1 from the Scratch :: Part 1
Viewed 5175 times since Thu, Nov 29, 2018