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>

2 (1)
Article Rating (1 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
SNAP in AIX
Viewed 11153 times since Mon, Sep 17, 2018
Problems with NFS on an AIX Reboot? Then Go Single
Viewed 5948 times since Wed, May 30, 2018
AIX WIKIS developerworks
Viewed 1994 times since Sun, Jun 17, 2018
AIX 7.2 running on my Macbook?
Viewed 11743 times since Mon, Jun 3, 2019
Script to make mksysb backup from NIM to LPAR
Viewed 3157 times since Thu, Feb 21, 2019
10 AIX Commands to Add to Your Toolbox
Viewed 3949 times since Sat, May 19, 2018
AIX, Security, System Admin↑ Generating random passwords
Viewed 2548 times since Fri, Apr 19, 2019
Awesome Command to show top 15 processes using memory on AIX
Viewed 23233 times since Thu, Nov 29, 2018
AIX, Networking↑ Adding and deleting a static network route using the command line
Viewed 2201 times since Fri, Apr 19, 2019
AIX: How to manage network tuning parameters
Viewed 3137 times since Mon, Jun 11, 2018