
roundup(16 * lvs, BS) +
roundup(16 + 4 * pxs, BS) * pvs) / BS, 8);
if (length > 768) {
printf("Warning: A bootable PV cannot be added to a VG \n"
"created with the specified argument values. \n"
"The metadata size %d Kbytes, must be less \n"
"than 768 Kbytes.\n"
"If the intention is not to have a boot disk in this \n"
"VG then do not use '-B' option during pvcreate(1M) \n"
"for the PVs to be part of this VG. \n", length);
}
length = roundup(length, 1024) / 1024;
if (length > 256 ) {
printf("Cannot configure a VG with the maximum values"
" for LVs, PVs and PXs\n");
exit(1);
}
for (i = 1; i < length ; i = i << 1) { }
printf("\nMinimum extent size for this configuration = %d MB\n", i);
exit(0);
}
EOF
make vgrasize
Choosing an Optimal Extent Size for a Version 2.x Volume Group
Like Version 1.0 Volume Groups, there is a relationship between extent size and maximum volume
group size. There is also a limitation on the number of extents an individual volume group can
contain. To determine the proper size, the
vgcreate
command has a new
–E
option. This option
displays the maximum volume group size based on the given physical extent size or minimum
physical extent size based on the maximum volume group size.
Example
After you know the VG size you want to provision for, use vgcreate with the –E option to determine
the minimum extent size required to achieve it.
What is the minimum extent size to provision a 2.0 VG for 1 PB?
# vgcreate -V 2.0 -E -S 1p
Max_VG_size=1p:extent_size=32m
What is the maximum 2.0 volume group size with an extent size of 16MB?
#vgcreate -V 2.0 -E -s 16
Max_VG_size=512t:extent_size=16m
What is the minimum extent size to provision a 2.1 VG for 2 PB?
# vgcreate -V 2.1 -E -S 2p
Max_VG_size=2p:extent_size=64m
What is the maximum 2.1 volume group size with an extent size of 32MB?
# vgcreate -V 2.1 -E -s 32
Max_VG_size=1p:extent_size=32m
156
Volume Group Provisioning Tips