Wednesday, October 10, 2012

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.

AIX# cfgmgr

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

AIX# lsdev -Cc disk
AIX# lspv

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

AIX# mkvg -y neilvg 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).

AIX# lspv hdisk2

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

AIX# mklv -t jfs2log neilvg 1

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

AIX# lsvg
AIX# lsvg -l neilvg

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

AIX# lsvg neilvg
AIX# mklv -t jfs2 -y neillv neilvg 30G

9) Lay down your file system on neillv.

AIX# mkfs -o log=/dev/loglv00 -V jfs2 /dev/neillv

10) Mount your filesystem.

AIX# mkdir /mountpoint
AIX# mount -o log=/dev/loglv00 /dev/neillv /mountpoint

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

No comments:

Post a Comment