Monday, 15 April 2013

How to Add a Disk on AIX LVM

How to Add a Disk on AIX Logical Volume Manager (LVM)

1) Add the physical or virtual disk to the logical partition.

2) Rescan your hardware so that the OS is aware of your new disk.

# cfgmgr

3) Check to see your disk. For the purpose of this example, let’s say the new disk is hdisk2.

# lsdev -Cc disk
# lspv

4) Associate your new disk to a volume group. In this case, let’s create a new group called myvg and put hdisk2 in there.

# mkvg -y myvg hdisk2

5) Now you can look at the size of hdisk2. (This command won’t work if it’s not associated with a volume group).

# lspv hdisk2

6) Create a log logical volume for jfs2. This needs to be part of myvg. Note: in the example below, the type is jfs2log and we’re giving it 1 physical partition (PP).

# mklv -t jfs2log myvg 1

7) Look for your new logical volume (lv). Chances are that AIX named it loglv00.

# lsvg
# lsvg -l myvg

8) Create your production logical volume. Let’s make it about 30GB? I’ll name it mylv1.

# lsvg myvg
# mklv -t jfs2 -y mylv1 myvg 30G

9) Lay down your file system on mylv1.

# mkfs -o log=/dev/loglv00 -V jfs2 /dev/mylv1

10) Mount your filesystem.

# mkdir /myfs1
# mount -o log=/dev/loglv00 /dev/mylv1 /myfs1

11) Edit /etc/filesystems and change the dev and log stanzas to match your dev and log names from above.


  1. Please fix "edit /etc/filesystem" to "edit /etc/filesystems, ensuring that the sequence of the mounts occur in order (mount /, then /newdisk.)

  2. # mkfs -o log=/dev/loglv00 -V jfs2 /dev/mylv1
    mkfs: destroy /dev/mylv1 (y)?
    logform: destroy /dev/rloglv00 (y)?
    File system created successfully.
    65328 kilobytes total disk space.
    Device /dev/mylv1:
    Standard empty file system
    Size: 130656 512-byte (DEVBLKSIZE) blocks

    Can we share a example when this type of association is done with a log lv and with a single mount point.