Scalable volume groups first appeared in AIX 5.3. They allow a maximum of 1024 physical volumes and 4096 logical volumes per volume group. This is pretty cool for large systems. In the old days we could end up in situations where wed reached the maximum PV count (32 or 128) for a VG and have to create a new VG to work around the issue.

I use scalable VGs for all my new large AIX system builds.

The following command will create a scalable VG (named svg) on hdisk4. Youll notice that MAX PVs is set to 1024 and MAX LVs is set to 256.

# mkvg -S -ysvg hdisk4

svg

# lsvg svg

VOLUME GROUP: svg VG IDENTIFIER: 00f6048800004c0000000133336703a0

VG STATE: active PP SIZE: 32 megabyte(s)

VG PERMISSION: read/write TOTAL PPs: 1597 (51104 megabytes)

MAX LVs: 256 FREE PPs: 1597 (51104 megabytes)

LVs: 0 USED PPs: 0 (0 megabytes)

OPEN LVs: 0 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: 32768 MAX PVs: 1024

LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no

HOT SPARE: no BB POLICY: relocatable

PV RESTRICTION: none

So, MAX LVs is set to 256 by default in a scalable VG. Fine, but what if I need to grow higher than that? Well, we can use the chvg command to set MAX LVs to a higher number, such as 4096 (the maximum).

# chvg -v 4096 svg

We made this change while the VG was varied on and file systems are open.....very nice indeed!

# lsvg svg

VOLUME GROUP: svg VG IDENTIFIER: 00f6048800004c0000000133336703a0

VG STATE: active PP SIZE: 32 megabyte(s)

VG PERMISSION: read/write TOTAL PPs: 1597 (51104 megabytes)

MAX LVs: 4096 FREE PPs: 1597 (51104 megabytes)

LVs: 0 USED PPs: 0 (0 megabytes)

OPEN LVs: 0 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: 32768 MAX PVs: 1024

LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no

HOT SPARE: no BB POLICY: relocatable

PV RESTRICTION: none

l488pp062_pub[/] >

From the chvg man page:

# man chvg

.....

-v LogicalVolumes

Increases the number of logical volumes that can be created. Valid values are 512, 1024, 2048 and 4096. The value should be larger than the current value or no action is taken. This option is only valid with Scalable-type volume groups. This option is not available for volume groups varied on in concurrent mode.

Once weve changed MAX LVs to a higher value, we cant go backwards. For example, if we try to change MAX LVs to a lower value, we receive the following message:

# chvg -v 256 svg

0516-1617 lchangevg: 256 is an invalid value for maxlvs, the value must be greater

than the current value, 4096, and cannot be greater than the limit, 4096.

0516-732 chvg: Unable to change volume group svg.

If we attempted to set MAX LVs to a higher value than whats supported wed receive the following message:

# chvg -v 8192 svg

0516-1614 lchangevg: The valid values for maxlvs include 256, 512, 1024,

2048, and 4096. This option is only usable for scalable

volume groups.

Usage: lchangevg -g VGid -p PVid [-r RemoveMode] [-a AllocateMode]

0516-732 chvg: Unable to change volume group svg.