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
AIX Creating EtherChannel Devices from Command Line
Viewed 5385 times since Mon, Jun 3, 2019
AIX Errpt - Diag - Alog
Viewed 4960 times since Wed, Mar 20, 2019
LVM: Shrink & extend a filesystem/volume
Viewed 2980 times since Sun, Jun 3, 2018
How To Mirror VG and Root VG
Viewed 4758 times since Mon, May 21, 2018
How do I analyze and debug core files on AIX
Viewed 8828 times since Thu, Feb 21, 2019
Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment
Viewed 3312 times since Thu, Sep 20, 2018
AIX lspath Missing path
Viewed 11624 times since Fri, Oct 5, 2018
AIX oslevel version OS
Viewed 5940 times since Wed, Apr 17, 2019
AIX FC Performance improvements for IBM AIX FC and FCoE device driver stacks
Viewed 7571 times since Fri, Jan 31, 2020
LVM: Unmirror/Mirror "rootvg" Volume Group
Viewed 4698 times since Mon, May 21, 2018