AIX HOW TO CLONE A ROOTVG USING ALTERNATE DISK INSTALLATION ALTER_DISK_COPY

Sometimes we need to upgrade the AIX Technology Level (TL), but it cans became dangerous because imagine if we perform an upgrade and after that the system simply doesn’t start again, or maybe an application start getting locking. What I meant is that always we need to have a fallback plan, like an easier backup.

hds       The rootvg is the VG responsible to store the AIX configuration, so before to start the upgrade we can create an alternate VG, it is almost like mirroring, but to install an alternate VG we need to have 2 disks, one that has the rootvg and another one without any data. When we perform the alternate VG it will copy an image of your current system and store it in the other disk, so in the future if necessary to make a fallback it can be performed in few minutes.

      Sometime people think that if the server already has an image stored in a TAPE it is good, and is not necessary to do an alternate disk, but you need to understand that the reading speed of a TAPE is really slow, and customers always does not have time to wait. And with an alternate VG you can make this fallback in few minutes.

Step 1. Preparing for the alternate disk installation

      You need to have two disks to perform this installation, one must be not part of any VG( as hdisk1) and the other should be the disk with the rootvg(hdisk0) :

            hdisk0         0009710fa9c79877    rootvg   active
            hdisk1         0009710f0b90db93    None

 

  Obs. At this point if you rootvg is using a mirror you will net to unmirror the vg and remove the other disk from the rootvg as bellow :
      # unmirrorvg rootvg
      # reducevg rootvg hdiskXX

 

      If your rootvg is using a mirror you can use the disck removed from rootvg to perform the alternate. 

Step 2. Performing the clone      The coomand-line for cloning rootvg is :

       # alt_disk_install -C -B hdisk1
                        -C : To create the alternate
                        -B : To not change the boot sequence
                        hdisk1 : the disk not in user

     To follow the process of the alternate task look at the alternate disk log file in : /var/adm/ras/alt_disk_inst.log

Step 3. Checking if the alternation worked

     To check if the alternation was done you can check with the lspv :

            hdisk0         0009710fa9c79877    rootvg           
            hdisk1         0009710f0b90db93    altinst_rootvg  

          3.1. Wake up your alternate VG to see if it is working 

             To make sure if it is working you can wake up your alternation VG with the command below, and after the command load finish you type df :

                 # alt_rootvg_op -W -d hdisk1

                 # df -m
                 Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
                 /dev/hd4         128.00    102.31   21%     2659    11% /
                 /dev/hd2        1968.00    111.64   95%    40407    58% /usr
                 /dev/hd9var      112.00     77.82   31%      485     3% /var
                 /dev/hd3          96.00     69.88   28%      330     3% /tmp
                 /dev/hd1         208.00    118.27   44%     1987     7% /home
                 /proc                 –         –    –         –     –  /proc
                 /dev/hd10opt    1712.00   1445.83   16%     6984     3% /opt
                 /dev/alt_hd4     128.00    102.16   21%     2645    11% /alt_inst
                 /dev/alt_hd1     208.00     33.64   84%     1987    21% /alt_inst/home
                 /dev/alt_hd10opt   1712.00   1445.77   16%     6984     3% /alt_inst/opt
                 /dev/alt_hd3      96.00     72.38   25%      335     2% /alt_inst/tmp
                 /dev/alt_hd2    1968.00    100.32   95%    40407    59% /alt_inst/usr
                 /dev/alt_hd9var    112.00     77.53   31%      477     3% /alt_inst/var

          3.2. Put your alternate VG to sleep back

            You need to remember to sleep back your alternate disk, otherwise if you reboot the system you can damage your alternation data :

                 # alt_rootvg_op -S hdisk1

Step 4. Booting from the alternate disk

     By default if you not type -B when perform the step 2, the boot sequence will be changed to the alternate disk. We have used the -B so the boot sequence is the same than before.

     Let’s make believe that anything helped and we need to boot the system with the alternate disk. To change the boot sequence is just follow the steps  :

     To check the bootable disk that is set:

               # bootlist -m normal -o
                  hdisk0

     To change the boot disk :
                 # bootlist -m normal hdisk1

Step 5. Destroy the alternate

                 # alt_disk_install -X <Alternate_VG_Name>

3 (2)
Article Rating (2 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
What is OS Watcher Utility and How to use it for Database Troubleshooting ?
Viewed 30366 times since Thu, Jun 21, 2018
AIX Full memory dump configure
Viewed 3523 times since Mon, Jul 16, 2018
Mount CD/DVD & ISO image in AIX 6.1
Viewed 4200 times since Tue, Jul 17, 2018
AIX: Error code 0516-1339, 0516-1397 0516-792: cannot extendvg with a previous Oracle ASM disk
Viewed 3927 times since Wed, Feb 6, 2019
10 AIX Commands to Add to Your Toolbox
Viewed 4523 times since Sat, May 19, 2018
AIX NFS Version 4 configuration over Kerberos inter-realm setup
Viewed 4243 times since Wed, Jun 27, 2018
Setup private yum repository for AIX clients
Viewed 11420 times since Thu, Feb 21, 2019
Configuration of AIX Fast Connect and SMBFS
Viewed 8733 times since Mon, Jun 18, 2018
My LPAR always boots into SMS. Why?
Viewed 3959 times since Tue, Apr 16, 2019
AIX - How to get network speed and statistic of ethernet adapter in AIX
Viewed 14678 times since Fri, Jun 8, 2018