Get More Disk Space Without More Disk

Growing the LUN size on AIX is very simple and can be done online

by Adrian Mahendrata

What happens when you need to add more space to your volume group? Well, you could assign a new Logical Unit Number (LUN) from your Storage Area Network (SAN) and add the LUN to the volume group. But because the AIX Logical Partition (LPAR) is running on SAN storage, why not just expand the LUN and get AIX to recognize the new LUN size? This saves you from having to add extra disks to the AIX LPAR, and an LPAR with fewer SAN LUNs is definitely easier to manage.

For example, consider a Network Installation Manager (NIM) server. Suppose you want to assign additional disk space to house a new release of AIX. Rather than adding a new LUN for it, “growing” the current LUN might be a better and easier option.

Increasing LUN size is generally done at the storage level by the storage administrator. This is great—one less thing for you to do! Once the LUN size is expanded, AIX needs to be made aware of the change. Let’s walk through how it all works.

Before LUN Size Increase

In this example, I have a single physical volume (PV) called hdisk0. You can see the properties of the disk using the lspv command:

# lspv hdisk0|egrep “VOLUME|TOTAL PP”
PHYSICAL VOLUME:    hdisk0                     VOLUME GROUP:     vg01
PP SIZE:            64 megabyte(s)             LOGICAL VOLUMES:  2
TOTAL PPs:          3199 (204736 MB)           VG DESCRIPTORS:   2

The physical volume that houses volume group vg01 is hdisk0, and it shows the size before the LUN is increased. Notice that the total physical partitions (TOTAL PPs) currently configured is 3,199 (20,4736 MB).

You can see how much space is available for volume group vg01 using lsvg.

# lsvg vg01
VOLUME GROUP:       vg01                     VG IDENTIFIER:  00c53ea700004c00000001419b02a761
VG STATE:           active                   PP SIZE:        64 MB(s)
VG PERMISSION:      read/write               TOTAL PPs:      3199 (204736 MB)
MAX LVs:            256                      FREE PPs:       14 (896 MB)
LVs:                3                        USED PPs:       3185 (203840 MB)
OPEN LVs:           3                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     4064                     MAX PVs:        8
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no

Notice that the free physical partitions (FREE PPs) field for volume group vg01 is set to 14 (896 MB).

Increasing the Volume Group Size

After the storage administrator (this could be you) increases the LUN size, the OS needs to be made aware of the change. The chvg command sets the characteristics of a volume group, and the –g option of the chvg command examines the LUNs belonging to the specified volume group and identifies if they’ve grown in size. The OS will then add the additional required PP to the physical volume.

# chvg -g vg01

If the command was successful, it will simply return to a shell prompt. You can then list the disk characteristics again using lspv hdisk0. This should show the larger disk size in the TOTAL PPs field.

# lspv hdisk0|egrep “VOLUME|TOTAL PP”
PHYSICAL VOLUME:    hdisk0                     VOLUME GROUP:     vg01
PP SIZE:            64 megabyte(s)             LOGICAL VOLUMES:  2
TOTAL PPs:          3999 (255936 MB)    VG DESCRIPTORS:   2

Notice that the TOTAL PPs field has increased to 3,999 (255,936 MB) from 3,199 (204,736 MB). Now you can list the volume group characteristics again.

# lsvg vg01
VOLUME GROUP:       vg01                     VG IDENTIFIER:  00c53ea700004c00000001419b02a761
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      3999 (255936 MB)
MAX LVs:            256                      FREE PPs:       814 (52096 MB)
LVs:                3                        USED PPs:       3185 (203840 MB)
OPEN LVs:           3                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     4064                     MAX PVs:        8
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      non-relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no

Notice that there’s now an extra 50 GB of free physical partitions ready to be allocated to the logical volumes in the volume group vg01.

That’s all there is to it. As you can see, growing the LUN size on AIX is very simple, and all the activity just demonstrated is done online.

Grow Your Disk for More Space

There’s a restriction in resizing rootvg, classic volume group, and enhanced concurrent volume group prior to AIX 6.1 TL4. However, as stated in APAR IZ80021 and an IBM Technote, this restriction has been removed. This means you can resize your rootvg volume group, as long as your OS is running at least AIX 6.1 TL4. It’s extremely handy if you need more space for your rootvg volume group or any static volume groups. So the next time you’re running out of space, stop and ask yourself if you need extra disk or just some extra space on your existing disk. If it’s the latter, just grow your LUN!

 

Can be later cialis price walmart On a kind of viagra which women have to use. The price of it will change and isn’t excluded that to the best.

PREV

Lenovo Plans to Acquire IBMs x86 Server Business

NEXT

IBM Creates $1 Billion Watson Group

WRITTEN BY: