Technote (FAQ)
 
Question
How to use multibos
 
Answer
Multibos
1. What is multibos?
2. Requirements for multibos
3. How to create a multibos instance
4. How to update a standby BOS
5. How to mount and unmount a standby BOS
6. How to start an interactive shell
7. How to install a fileset to a standby BOS
8. How to remove a fileset in a standby BOS
9. How to install an ifix to a standby BOS
10. How to remove an efix from a standby BOS
11. How to change the bootlist for multibos
12. How to rebuild the standby BOS boot image
13. How to migrate with multibos
14. Where are the logs for multibos?
15. How to remove an instance of multibos
16. Debugging Failed multibos
17. Things to be aware of


1. What is multibos?

multibos is multiple copies of the base operating system (BOS) on the same root volume group (rootvg). You can simultaneously maintain two bootable instances of a BOS. The instance of a BOS associated with the booted BLV is the active BOS. The instance of a BOS associated with the BLV that has not been booted is the standby BOS. Only two instances of BOS are supported per rootvg.

The multibos setup operation creates a standby Base Operating System (BOS) that boots from a distinct Boot Logical Volume (BLV). This creates two bootable instances of BOSes on a given rootvg. You can boot from either instance of a BOS by specifying the respective BLV as an argument to the bootlist command, or using system firmware boot operations.

The multibos utility allows you to access, install, maintain, update, and customize the standby BOS either during setup or during any subsequent customization operations. Installing maintenance or technology level updates to the standby BOS does not change system files on the active BOS. This allows for concurrent update of the standby BOS, while the active BOS remains in production.

The multibos utility has the ability to copy or share logical volumes and file systems. By default, the multibos utility copies the BOS file systems (currently the /, /usr, /var, /opt, and /home directories), associated log devices, and the boot logical volume. You can make copies of additional BOS objects (see the –L flag). All other file systems and logical volumes are shared between instances of the BOS. Separate log device logical volumes (those not contained within the file system) are not supported for copy and will be shared.


Flags:

-a = Update_all -N = Block bosboot
-B = Bosboot operation -n = Block cleanup
-b = Install bundle file -p = Preview only
-c = Customization operation -R = Remove operation
-e = Exclude file -S = Shell operation
-f = Fix List file -s = Setup operation
-i = image.data file -t = Block bootlist change
-L = Additional LVs file -u = Unmount operation
-l = Install device or directory -X = Expand file systems as needed
-m = Mount operation -M = Mksysb setup operation

The preview option, using the -p flag, applies to the setup, remove, mount, unmount, and customization operations. If you specify the preview option, then the operation provides information about the action that will be taken, but does not perform actual changes.

The multibos -X flag auto-expansion feature allows for automatic file system expansion, if space is necessary to perform multibos-related tasks. Run all multibos operations with this flag.


2. Requirements for multibos

Following are the general requirements and limitations:

* The multibos utility is supported on AIX 5L Version 5.3 with the 5300-03
Recommended Maintenance package and higher versions.

* The current rootvg must have enough space for each BOS object copy.
BOS object copies are placed on the same disk or disks as the original.

* The total number of copied logical volumes cannot exceed 128. The total
number of copied logical volumes and shared logical volumes are subject to
volume group limits.


3. How to create a multibos instance

To preview the creation of a multibos instance
multibos –Xsp

If preview is successful, create a multibos instance
multibos –Xs


4. How to update a standby BOS

To do an update_all on an existing multibos instance
# multibos –Xac -l <location of update images>

To create a multibos instance and update it at the same time
# multibos –Xsa –l <location of update images>


5. How to mount and unmount a standby BOS

To mount a standby BOS
# multibos –Xm

To unmount a standby BOS
# multibos –Xu


6. How to start an interactive shell

# multibos –S
That will give you the following prompt
MULTIBOS>
To exit out of the interactive shell just type exit

Note: When you exit back to the active instance, the standby instance is still mounted.

To unmount the standby instance :

multibos -Xu



7. How to install a fileset to a standby BOS

To install a fileset(s) to an existing multibos instance
Create a bundle file with the name of the file(s) to be installed
vi /tmp/list
I: invscout.websm
I:<fileset2>
etc.
Then to install it
multibos -Xc -b /tmp/list -l <location of install images>


8. How to remove a fileset in a standby BOS

First initiate an interactive shell
# multibos -S
MULTIBOS> smitty remove
Then exit the interactive shell
MULTIBOS> exit


9. How to install an efix to a standby BOS

Create a bundle file with the name of the efix(s) to be installed
vi /tmp/efixes
E:IY#####.#####.epkg.Z
E:<efix 2>
etc.
Then to install it
multibos -Xc -b /tmp/efixes -l <location of efixes>

10. How to remove an efix from a standby BOS

First initiate an interactive shell
# multibos –S
Verify there is an efix
MULTIBOS> /usr/sbin/emgr –P
Then to remove it
MULTIBOS> /usr/sbin/emgr -r -L <fix name>
Then exit the interactive shell
MULTIBOS> exit


11. How to change the bootlist for multibos

The bootlist command supports multiple BLVs.
To boot from disk hdisk0 and BLV bos_hd5, and have it display the bootlist you would enter the following:
# bootlist –m normal –o hdisk0 blv=bos_hd5
hdisk0 blv=bos_hd5

You can also specify to boot from the current active BOS in case the standby BOS doesn’t boot.
# bootlist –m normal –o hdisk0 blv=bos_hd5 hdisk0 blv=hd5
hdisk0 blv=bos_hd5
hdisk0 blv=hd5
After the system is rebooted from the standby BOS, the standby BOS logical volumes are mounted over the usual BOS mount points, such as /, /usr, /var, and so on.


12. How to rebuild the standby BOS boot image

# multibos -XB


13. How to migrate with multibos

Starting with 5.3 TL9 you can add a 6.1 TL2 (or above) instance. This is done with the new –M flag. You must be running with the 64bit kernel.
This isn’t really a migration because it populates the second instance using a mksysb based on the new release.

In 6.1 TL2 a new flag (-M) was added to the mksysb command which allows you to create a mksysb for use with multibos. It creates a backup of BOS (/, /usr, /var, /opt).
bos.alt_disk_install.boot_images must be installed.

To preview the multibos migration
multibos –M <location of mksysb> -spX

To perform the multibos migration
multibos –M <location of mksysb> -sX

It is not advised to run in this environment for an extended period of time. There could be problems if tfactor or maps are used. Be aware that 6.1 specific attributes may not be reflected in the standby instance.


14. Where are the logs for multibos?

You can view the multibos log via the following:
alog –of /etc/multibos/logs/op.alog | pg

There are also other logs in the /etc/multibos/logs directory
- scriptlog.<timestamp>.txt : A log of commands being run during the current
shell operation.
- scriptlog.<timestamp>.txt.Z : A compressed log of commands run during a
previous shell operation.


15. How to remove an instance of multibos

# multibos –RX

The multibos remove operation performs the following steps:
1. All boot references to the standby BLV are removed.
2. The bootlist is set to the active BLV. You can skip this step using the -t flag.
3. Any mounted standby BLVs are unmounted.
4. Standby file systems are removed.
5. Remaining standby logical volumes are removed.


16. Debugging Failed multibos

NOTE: THESE FLAGS ARE UNDOCUMENTED AS THEY ARE FOR IBM SUPPORT USE ONLY
[-D]
Specifies that complete debug output be generated.

[-d <fname>]
Specifies that debug output be generated for function <fname>.

[-T <fname>]
Specifies that a breakpoint be set in function <fname>. Upon hitting the function, a multibos shell will be opened.
NOTE: This option requires user interaction once the function is entered.

Gathering Testcase Data
The following are useful as testcase data:
A general snap (snap -g).
The contents of /etc/multibos.
The contents of /bos_inst/etc/multibos.
NOTE: This requires mounting the standby instance


17. Things to be aware of

Migration is not currently supported with multibos. If you have multibos on your system you will need to remove it before doing a migration.

No Alternate Disk Installation operations are currently supported for this environment.
Currently, the only supported method of backup and recovery of a rootvg with multiple instances is mksysb via CD, tape or NIM.

To determine if multibos is on a system before performing a migration or alt_disk operation do lsfs If multibos is on the system you will see mount points listed that start with bos_


An undocumented verify operation is run from the inittab during boot. The inittab
entry looks as such:

mbverify:23456789:wait:/usr/sbin/multibos -V 2>&1 | alog -t boot > /dev/console

It is highly recommended that the user not modify this entry. This verify
operation allows the multibos utility to synchronize changes in logical volumes
and filesystems between the active and standby instances. This entry also
synchronizes the ODM and devices on initial boot after a mksysb restore.
Without this operation, both the active and standby instances could become
inconsistent with normal filesystem and logical volume operations.

More info can be found in /usr/lpp/bos/README.multibos