Operating System - HP-UX
1753971 Members
7618 Online
108811 Solutions
New Discussion юеВ

LVM2 Information required

 
SOLVED
Go to solution
Chauhan Amit
Respected Contributor

LVM2 Information required

Hi Experts,

Has anybody worked on LV2 , need following information regarding the same:

a) Which versions of 11iv2/v3 contains lvm2 bundles
b) do we need to install lvm2 separately
c) How to create LVM 2 Volumes
d) Any documentation or link to the same ?
e) How different is this from existing lvm.

Regards,
Amit
If you are not a part of solution , then you are a part of problem
5 REPLIES 5
Matti_Kurkela
Honored Contributor

Re: LVM2 Information required

a) I sense great confusion... 11iv2 and 11iv3 are HP-UX versions, and LVM2 is a Linux feature. Since you posted to the Linux forum section, I assume you're talking about Linux. Please correct me if I am wrong.

(HP-UX has LVM and VxVM. HP-UX LVM's administration commands are very similar to Linux LVM1 and LVM2, but you cannot read HP-UX LVM disk with any Linux LVM, nor vice versa. VxVM is very different.)

b) Depends on your Linux distribution. Almost all current Linux distributions include LVM2 by default. (LVM2 was included into the standard Linux kernel by kernel version 2.6.9. Any distributions older than that are generally using LVM1.)

c) Just as with LVM1. The LVM tools will automatically use the LVM2 format by default. If you want to create LVM1 volume groups in a LVM2-capable machine, you can do it with "pvcreate -M1 /dev/".

d)
Begin here: http://sourceware.org/lvm2/
Also read the LVM HOWTO: http://www.tldp.org/HOWTO/LVM-HOWTO/index.html

e) Not very different. LVM2 is backwards compatible with LVM1 and can use disks and volume groups created with LVM1. You can even migrate LVM1 volume groups to LVM2 without losing data.

LVM1 had a maximum limit of 65534 extents per LV, and one extent could be anything from 8 KB to 16 GB. The default extent size was 4 MB, giving a default maximum LV size of about 256 GB.

LVM2 changed the LVM metadata format, and now there is no such limit any more. Other things will limit how large LVs the kernel can handle, though: on 32-bit machines with LVM2, the maximum LV size is 16 TB... and on 64-bit machines, the limit is 8 Exabytes, or about 8 000 000 Terabytes.

MK
MK
James R. Ferguson
Acclaimed Contributor
Solution

Re: LVM2 Information required

Hi Amit:

If by chance you are asking about HP-UX and the new LVM version 2.0 released with the March 2008 11.31 (11iv3) release, then see this whitepaper:

http://docs.hp.com/en/lvm-v2/L2_whitepaper_8.pdf

Regards!

...JRF...
Chauhan Amit
Respected Contributor

Re: LVM2 Information required

Hi James,

Thanks a ton , that was the information I was looking for .I was not able to locate the same on HP docs site.

Regards,
Amit
If you are not a part of solution , then you are a part of problem
Chauhan Amit
Respected Contributor

Re: LVM2 Information required

Hi MK,

a) I sense great confusion... 11iv2 and 11iv3 are HP-UX versions, and LVM2 is a Linux feature. Since you posted to the Linux forum section, I assume you're talking about Linux. Please correct me if I am wrong.

Amit > We have LVM2 for HP-UX as well and was talking about HP-UX only. But seems I have posted the same in wrong forum ,sorry for the confusion.

Thanks for sharing the information regarding Linux. That will also be very helpful.

Regards,
Amit
If you are not a part of solution , then you are a part of problem
Chauhan Amit
Respected Contributor

Re: LVM2 Information required

LVM 2.0 and 2.1 has been shipped with 11iv3 sept 2008 edition.
The only tweak is the -V option.

Here is the man page

LVM's Volume Group Versions 1.0, 2.0, and 2.1
LVM now has three different volume group version, 1.0, 2.0, and 2.1.
The original version of LVM volume group is 1.0. Versions 2.0 and 2.1
volume groups allows LVM to increase many of the limits constraining
the size of volume groups, logical volumes, and so on. To see a
comparison of limits for volume groups version 1.0, 2.0, and 2.1, use
the lvmadm command (see lvmadm(1M)).

The procedures and command syntax for managing volume groups version
1.0 is unchanged.

To take advantage of the improvements in volume groups version 2.0 or
higher, a volume group is declared to be version 2.0 or 2.1 at
creation time using the new -V option to the vgcreate command.



The vgcreate command will create the volume group directory and group
file if they do not already exist. This is independent of the volume
group version.

There are several differences in the procedure for creating a volume
group which is to be version 2.0 or higher.

+ The volume group directory and group file will have a
different major/minor number combination. See vgcreate(1M)
for details.

+ It is no longer necessary to set maximums for physical
volumes, logical volumes, or extents per physical volume.
Instead the vgcreate command expects a maximum size for the
volume group. This size of a volume group is the sum of the
user data space on all physical volumes assigned to the volume
group.

+ Extent size is now a required parameter. For volume groups
version 1.0, the default extent size is 4MB. For volume
groups version 2.0 or higher, extent size must be specified.

Volume group versions 2.0 and higher do not support root, boot, swap,
or dump. Additionally, volume groups version 2.0 or higher do not
support spare physical volumes.

The maximum number of 1.0 version volume groups per system is 256.
The maximum number of 2.0 version volume groups per system is 512.
The maximum combined 2.0 and 2.1 volume groups is 2048.

Extent Sizing for Volume Group Version 2.0 and Higher
In volume groups version 1.0, LVM metadata is required to fit into a
single physical extent. If large values for maximum physical volumes,
logical volumes, and extents per physical volume were chosen, then a
large extent size is required.

In volume groups version 2.0 and higher, metadata is not restricted to
an extent. There is an implementation limit to the number of extents
in a volume group (see lvmadm(1M)), so the larger the extent size the
larger the maximum volume group size which can be supported. The
amount of space taken up on each physical volume by LVM metadata is
dependent on the physical extent size and the maximum volume group
size specified when the volume group is created. LVM metadata for
volume groups version 2.0 and higher may consume more space than on
volume groups version 1.0.
The vgcreate command has a new option (-E) which will show the
relationship between extent size and maximum volume group size.

A smaller extent size allows finer granularity in assigning space to
logical volumes. It also means that smaller blocks of data are marked



And here is the syntax help

#vgcreate
Usage:
For creating version 1.0 volume group,
vgcreate
[-V 1.0]
[-f]
[-A Autobackup]
[-x Extensibility]
[-e MaxPhysicalExtents]
[-l MaxLogicalVolumes]
[-p MaxPhysicalVolumes]
[-s PhysicalExtentSize]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath ...

For creating version 2.x volume group,
vgcreate -V Version -S VolumeGroupSize -s PhysicalExtentSize
[-A Autobackup]
[-x Extensibility]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath ...

For volume group version 2.x,
vgcreate -V Version -E
{-S VolumeGroupSize |
-s PhysicalExtentSize}

Note: The "-f" option is not available for volume group version 2.0 or higher. More arguments required.
If you are not a part of solution , then you are a part of problem