Archive for October 5th, 2007

Large LVM volumes on HP-UX

When creating a large LVM volume group (over roughly 100G in size) under HP-UX, the process may fail mysteriously or hang. Working through the SAM administration GUI creates more mysterious errors

The solution and cause to this problem was explained nicely by Jim Marsden clear back in 2004. The problem comes up because when the LVM software was created, 9G and 18G volumes were the most common. Now with 100G+ volumes, the numeric limitations of LVM are becoming known.

Another limitation is that the volume group overhead data is becoming so large that it can no longer fit into a single physical extent (PE). This reserved area is called the Volume Group Reserved Area (VGRA). The VGRA is only one of several reserved areas, but is the only one we’ll discuss here.

To get around these limitations, you will have to create the volume group with a PE size large enough to contain the full VGRA, as well as a PE size that will accommodate the entire disk. If the volume group is already created with the default PE size of 4M, then it will have to be recreated with a new PE size. PE sizes are typically 4M, 8M, 16M, 32M, 64M, 128M, and 256M. Pick the smallest size that will work.

After the PE size is set, another limit must be set: the maximum number of physical extents per physical volume. This limit can be found by dividing the size of the largest disk by the PE size (mind those units!). For the current gigabyte-sized drives, this formula is:

MaxPEperPV = (gigabytes * 1024) / PEsize

For example, a 200G drive with 16M PEs translates into a MaxPEperPV of 12800.

Given these two pieces of information, the volume group can be created using the standard LVM utility vgcreate at the command line thusly:

vgcreate -s PEsize -e MaxPEperPV NewVG Disk1 Disk2 …

For example, using our current values, you might do:

vgcreate -s 16 -e 12800 /dev/vg00 /dev/dsk/c1t0d0

This problem might be present in some form in the Linux LVM implementation, but I rather doubt it - at least not until terabytes become common (uhoh….).


4 comments 5 October 2007


David Douthitt

David is an experienced UNIX and Linux system administrator, a former Linux distribution maintainer, and author of two books ("Advanced Topics in System Administration" and "GNU Screen: A Comprehensive Manual").

View David Douthitt's profile on LinkedIn

Top Posts

Calendar

October 2007
M T W T F S S
« Sep   Nov »
1234567
891011121314
15161718192021
22232425262728
293031  

Recent Posts

Recent Comments

ddouthitt on Core Linux - packages
GRUBówka « Bl… on Installing GRUB on FreeBS…
monsun on Installing GRUB on FreeBS…
hictio on Core Linux - packages
locky on Installing GRUB on FreeBS…

Category Cloud

BSD Career Debian Debugging Fedora FreeBSD HPUX Learning Linux MacOS X Mind Hacks Mobile Computing NetBSD Networking OpenBSD OpenSolaris Open Source OpenVMS Personal Notes Portable Presentations Programming Red Hat Scripting Security Solaris Tips Ubuntu UNIX Wheel Group

Archives

Links