Upgrading your AIX environment using multibos

If you haven’t clued on by now, AIX is my operating system of choice. I’m sure there are many arguments for and against, but looking at it from a systems administrator view point, it’s second to none. Anyway, that’s a story for another time. What I’m writing about today is patching your AIX installations using multibos. Now before I get started, I’ll stress two points:

1) Chris Gibson has already written two great (and far more in depth) articles on multibos, which I recommend reading before going any further (Links: here and here).
2) This blog of mine serves two purposes; To share some of the things I come about during my sysadmin activities and secondly also a dumping ground for documents I write for myself. This post is the latter, as multibos isn’t something that I use daily (maybe a few times a year), and really, who’s going to remember all those syntax switches 😛

Now, assuming you’ve read both articles, I don’t need to go into the benefits of multibos and I’ll dive straight into the how. I’ll be working on upgrading an AIX instance running 6100-05-01-1016 to the latest ML which at the time of writing is 6100-06-04-1112

PREREQUISITES
First things first, we need to make sure the current environment is ready to be copied. The two main things that I look for are:

1. Make sure the current environment doesn’t have any missing filesets.

root@AIX / > oslevel -s
6100-05-01-1016
root@AIX / > instfix -i | grep ML
    All filesets for 6100-00_AIX_ML were found.
    All filesets for 6100-01_AIX_ML were found.
    All filesets for 6100-02_AIX_ML were found.
    All filesets for 6100-03_AIX_ML were found.
    All filesets for 6100-04_AIX_ML were found.
    All filesets for 6100-05_AIX_ML were found.

**Note: If a particular ML doesn’t return positive (e.g. 6100-05_AIX_ML), use instfix -ciqk 6100-05_AIX_ML | grep “:-:” to see the fileset causing issues and rectify it.

2. Make sure all filesets have been committed. Now I’m not entirely sure if this is a requirement, but I prefer to work with an as clean environment as possible.

root@AIX / > lslpp -l | grep -i applied

**Note: If you have software which is in an applied state, commit it.

Now that we’re happy with the state of the environment, you need to verify that there is enough room in rootvg to make copies of the following logical volumes [/ (hd4), /usr (hd2), /var (hd9var), /opt (hd10opt) and the boot logical volume (hd5)].

Once we’ve satisfied the above requirement, we can get started with the multibos work. I’m not going to dissect each command, so I suggest reading the multibos man pages to know what each switch does. The only one that I’ll explain is -p, which does a preview of the multibos command executed.

MULTIBOS
1. Remove any previous standby multibos environments. The below command will return a FAILURE status if you don’t have a standby multibos environment. If you’re using multibos for the first time, this will be the case.

root@AIX / > multibos -RX
Initializing multibos methods ...
Initializing log /etc/multibos/logs/op.alog ...
Gathering system information ...
multibos: 0565-077 Unable to locate standby BOS.
 
Log file is /etc/multibos/logs/op.alog
Return Status: FAILURE

2. Create the standby BOS. New logical volumes and filesystems will be created prefixed and with bos_. This can take a while to complete.

This will preview the creation of the multibos environment and list all the logical volumes that will be copied.

root@AIX / > multibos -sXp
...
...
Log file is /etc/multibos/logs/op.alog
Return Status = SUCCESS

You can also view the log file using the alog command.

root@AIX / > alog -of /etc/multibos/logs/op.alog

If everything completed successfully, run the command again without the preview.

root@AIX / > multibos -sX

Once complete, you’ll notice that the new logical volumes will be prefixed with bos_

3. Once complete, you can drop into a multibos shell and check oslevel, it should be the same as the host OS.

The below command will mount all the filesystems required and drop you in a MULTIBOS> prompt

root@AIX / > multibos -S
...
...
MULTIBOS> oslevel -s
6100-05-01-1016

To umount all the filesystems and break out of the multibos environment.

MULTIBOS> exit

4. Apply the TL/ML to the multibos environment.

The below command will tell multibos to apply the updates from the specified location (which is the location that your new ML resides).

root@AIX / > multibos -Xac -l /home/kristijan/6100-06-04

Drop into the multibos shell again and check that the ML has been successfully applied.

root@AIX / > multibos -S
MULTIBOS> oslevel -s
6100-06-04-1112
MULTIBOS> instfix -i | grep ML
    	All filesets for 6100-00_AIX_ML were found.
    	All filesets for 6.1.0.0_AIX_ML were found.
    	All filesets for 6100-01_AIX_ML were found.
    	All filesets for 6100-02_AIX_ML were found.
    	All filesets for 6100-03_AIX_ML were found.
    	All filesets for 6100-04_AIX_ML were found.
    	All filesets for 6100-05_AIX_ML were found.
    	All filesets for 6100-06_AIX_ML were found.
MULTIBOS> exit

5. Verify that the bootlist now contains blv=bos_hd5. bos_hd5 is the location of the new boot logical volume. It will be at the top of the list when you run the bootlist command.

root@AIX / > bootlist -m normal -o
hdisk0 blv=bos_hd5 pathid=0
hdisk0 blv=hd5 pathid=0

You can now reboot into the new environment and verify that all went to plan.

6. If you need to back out of the change for any reason, just change the bootlist order back to blv=hd5 and reboot. Now, while this doesn’t bother me, it may bother others. You’ll notice after the reboot that your environment is now using the bos_ logical volumes. The only way to get your environment back to how it was using the original logical volume names is to create another multibos environment, and reboot into it. Since your current boot environment is using the bos_ logical volumes, it will create it using the original logical volume names (i.e. without the bos_). For those that want to do that, redo step 2 and reboot. However, I suggest not doing this for a week or so to be sure you’re happy with the new changes, as creating a new multibos environment will remove the backup environment with the previous ML.

As always, post comments/questions below.

6 thoughts on “Upgrading your AIX environment using multibos

  1. Very helpful post. Thank you.

    I think you’ll find that since AIX 6.1 TL 4 you can rename LVs online (see Chris Gibson’s post http://ibm.co/gWBaoP) but you’d need to remove the alternate environment first or rename its LVs so you don’t have duplicate names. The new LV names take effect after a reboot.

    Also, step 2 is missing a dash before the flags.

    • Thanks for pointing out the typo Anthony.

      Thanks for the heads up on the chlv -n as well. I’ve used it before, but never thought about applying it with multibos.

  2. i diidn’t understand why u want to do multibos again in the last in order to go back to last ML.just change the bootlist as u mention in the same para (in the beginning )that is also sufficient, i guess so.

    • Hi pratyay,

      You don’t need to do a multibos again to go back to the previous TL. Like you said, you just need to change the BLV in the bootlist.

      What I was talking about was after the initial reboot into the new TL environment, all the logical volumes which are copied as a part of the multibos process now have a prefix of bos_ An easy way to rename these back to the original names is to run the multibos process again, then simply reboot.

      However, as Anthony mentioned above, you can simply rename the logical volumes using chlv -n

      Hopefully this clears things up for you.

  3. I have upgrade TL level to AIX71.-TL4-SP02 with the multibos, after reboot. server come up with the latest level and multibos -R throwing the below Error.

    Could you please help me for fixing this issue.

    # multibos -R

    Initializing multibos methods …

    Initializing log /etc/multibos/logs/op.alog …

    Gathering system information …

    +—————————————————————————–+

    Remove Operation

    +—————————————————————————–+

    Verifying operation parameters …

    +—————————————————————————–+

    Boot Partition Processing

    +—————————————————————————–+

    Active boot logical volume is bos_hd5.

    Standby boot logical volume is hd5.

    +—————————————————————————–+

    Mount Processing

    +—————————————————————————–+

    Unmounting all standby BOS file systems …

    +—————————————————————————–+

    File Systems

    +—————————————————————————–+

    Removing all standby BOS file systems …

    Removing standby BOS file system /bos_inst/opt

    0516-1008 rmlv: Logical volume bos_hd10opt must be closed. If the logical volume

    contains a filesystem, the umount command will close the LV device.

    multibos: 0565-028 Error removing file systems.

    multibos: 0565-002 ATTENTION: cleanup did not complete successfully.

    Log file is /etc/multibos/logs/op.alog

    Return Status: FAILURE

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.