Tuesday, November 11, 2008

AIX Commands – Part I

Volume Group Commands

Display all VGs:

# lsvg

 

Display all active VGs:

# lsvg –o

 

Display info about rootvg,

# lsvg rootvg

 

Display info about all LVs in all VGs,

# lsvg -o |lsvg –il

 

Display info about all PVs in rootvg

# lsvg -p rootvg

 

Create VG with name vgxx on hdisk1 with partition size 8MB,

# mkvg -s 8 hdisk1

 

Create VG with name sivg on hdisk1 with partition size 8MB,

# mkvg -s 8 -y sivg hdisk1

 

Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016,

# mkvg -s 4 -t 2 -y sivg hdisk1

 

To make VG newvg automatically activated at startup,

# chvg -a y newvg

 

To deactivate the automatic activation at startup,

# chvg -a n newvg

 

To change maximum no. of PP to 2032 on vg newvg,

# chvg -t 2 newvg

 

To disable quorum on VG newvg,

# chvg -Q n newvg

 

Reorganises PP allocation of VG newvg,

# reorgvg newvg

 

Add PV hdisk3 and hdisk4 to VG newvg,

# extendvg newvg hdisk3 hdisk4

 

Exports the VG newvg,

# exportvg newvg

 

Import the hdisk2 with name newvg, and assign major number 44,

# importvg -V 44 -y newvg hdisk2

 

Remove PV hdisk3 from VG newvg,

# reducevg newvg hdisk3

 

To deactviate VG newvg,

# varyoffvg newvg

 

To activate VG newvg,

# varyonvg newvg

 

To sync the mirrored LV in the VG sivg,

# syncvg -v sivg

 

To mirror LVs of sivg with hdisk2 (-m for exact mirror, -S forbackground mirror),

# mirrorvg -S -m sivg hdisk2

 

To remove the mirrored PV from the set,

# unmirrorvg sivg hdisk2

 

To synchronize ODM with LVM(VGDA) for datavg,

# synclvodm datavg

 

File System  Commands … In next part

Multibos

 

Is it possible to have 2 BOS instance in a single rootvg and do patching on only 1 instance.

Yes. It is possible with the introduction of multibos.

“multibos” command allows the administrator to create multiple instances of AIX on the same rootvg. multibos setup operation actually creates a standby BOS that boots from a distinct logical volume. This creates 2 bootable sets of BOS on a single rootvg. Administrator can boot from either instance of BOS by specifying the respective BLV as an argument to the bootlist command.

The multibos command allows the administrator to access, install maintenance and technology levels for, update, and customize the standby BOS either during setup or in subsequent customization operations. Installing maintenance and technology 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.

In addition, the multibos command has the ability to copy or share logical volumes and file systems. By default, the BOS file systems (currently /, /usr, /var, and /opt,) and the boot logical volume are copied. You can also make copies of other file systems using –L flag.

ll other file systems and logical volumes are shared between instances of BOS. Separate log device logical volumes (for example, those that are not contained within the file system) are not supported for copy and will be shared.

But there are some restrictions for implementing multibos.

  • The multibos command is supported on AIX 5L Version 5.3 with the 5300-03 Recommended Maintenance package and later.
  • 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.

 

Lets see some examples,

1. To preview the creation of a standby BOS,

# multibos –sXp

My recommendation: Always preview (-p flag) the setup operation becore proceeding with the actual operation

2. To create a standby BOS,

# multibos –sX

3. To mount a standby BOS,

# multibos –m

4. To unmount a standby BOS,

# multibos –u

5. To remove a standby BOS,

# multibos –R

6. To start a standby BOS shell,

# multibos –S

After starting a standby BOS shell, you can do patching or customize the BOS.

7. To setup bootlist for the standby BOS,

# bootlist pm normal hdisk0 blv=bos_hd5

whereas bos_hd5 is the BLV for the standby BOS which was created by multibos setup operation.

If you want to boot from the old BOS, please boot from hd5.

I started using multibos to avoid alt_disk_install during patching. This saves a lot of downtime for me. After the creation of standby BOS, we do patching in the standby bos which happens during production time with no downtime. We need downtime only to boot the machine in standby BLV. Its very simple. Have a try.

Man Page for multibos

Friday, November 7, 2008

IBM AIX - Features and Limits

Its a bit old table. But its a really good doc for people working in different versions of AIX.

AIX Quick Sheet

AIX Quick Sheet

How to get partition number on AIX Partitions

I hope you guys already know about "lparstat -l" command which shows the details about a partition like partition id, cpu, memory allocations,etc..

Here is another option to get the partition id. OR You can make use of this option to find whether yoru server is an LPAR or not.

How to Get the Partition Number on Aix Partitions

AIX 5.1 Installation Document -

Here is a nice doc on AIX 5.1 Installation. It got screen by screen slides

AIX Etherchannel Load Balancing Options

Here is a cool document about Etherchannel Load Balancng options in AIX.