Operating System - HP-UX
1829759 Members
19795 Online
109992 Solutions
New Discussion

lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

 
SOLVED
Go to solution
Eberno
Regular Advisor

lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

Dear Guys,

Please helpe-me...
I have one problem... description about:

#> lvcreate -n l100 -L 511920 /dev/vg100
lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize
of the Volume Group. Resulting number of extents is out of the range
1 to 65535 (127980).
13 REPLIES 13
A. Clay Stephenson
Acclaimed Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

It's rather self-explanatory. The LVOL size must be in the range of 1 - 64K logical extents which are the same size os the physical extents (4MB's in your case) so that the largest LVOL is 64K * 4MB or 262144MB.
If it ain't broke, I can fix that.
Eberno
Regular Advisor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

My friend,

I need create one FS with 511920 MB, and have five disks with 100GB. How can create?
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

You will need to recreate the volume group with a PE size of at least 8MB (which will barely fit your requirement and if you may add still larger disks or LUN's at a later time then 16MB would be a good choice for a PE size. Of cource, you must vgchange -a n /dev/vg100 and vgexport /dev/vg100 before recreating the VG.
If it ain't broke, I can fix that.
DCE
Honored Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize


The PE size is set at the time the VG is created. You will have to remove the VG and receate it with a larger extent size, preferably 16MB, so you have some wiggle room.

Matti_Kurkela
Honored Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

When you create a volume group, four values must be selected:
- size of physical extents for this volume group (PE size: default 4 MB, can be 4, 8, 16, 32, 64, 128 or 256 MB)
- the maximum number of physical extents per physical volume (MaxPE: default is 1016 or appropriate for the physical volume used to create the VG, whichever is larger; maximum is 65535)
- the maximum number of physical volumes for this volume group (MaxPV: default is 16, maximum is 255)
- the maximum number of logical volumes for this volume group (default is 255, which is also the maximum)

These values cannot be changed once the volume group has been created. They will limit the size and number of physical volumes you can use in that volume group. The maximum size of a logical volume is also limited to 65535 extents, as you discovered.

You are requesting a logical volume of 511920 MB in size. The error message reveals it would need 127980 extents to create that, so your PE size is 511920 MB / 127980 = 4 MB, the default value.

The only way you will be able to create a logical volume of that size in that volume group is to destroy the volume group and recreate it with different parameters. You need to back up all the data and restore it to the logical volumes of the re-created volume group.

This is what happens when the creator of the volume group does not plan ahead for expansion in the future (or the need of expansion is severely underestimated).

For modern disks, the PE size of 4 MB is *way* too small. I'd recommend that all VGs for new systems be always created with the PE size of 16 MB or above. For large data VGs, I'd recommend an extent size of at least 64 or 128 MB always if possible. This will also determine the maximum LV size, because it is always 65535 * PE size.

When creating a new volume group, you must also think about the MaxPE value. If you use the default values and the physical volume size divided by the extent size is more than 1016, the current physical volume size gets effectively hardcoded as the maximum physical volume size for that volume group. Since disks are getting bigger all the time, it is very likely the disks you will want to add to the VG in the future are going to be bigger than the current disks.
MK
Eberno
Regular Advisor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

My friends...

Its, ok, I can create this LVol, but I have other problem...

#> mount /dev/vg100/l100 /orahis100
/dev/vg100/l100: unrecognized file system
#> fsck -y /dev/vg100/l100
fsck: /etc/default/fs is used for determining the file system type
vxfs fsck: not a valid vxfs file system
invalid super-block
vxfs fsck: cannot initialize aggregate
file system check failure, aborting ...
Patrick Wallek
Honored Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

First, I doubt that the lvol was created initially since the command errored.

Second, you have just created the LV, you haven't said whether you created the filesystem on the LV or not.

To do that:

# newfs -F vxfs -o largefiles /dev/vg100/rl100

# man newfs

if you need information on what the command is doing.
Eberno
Regular Advisor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

My friend,

I executed the command newfs, but, this error:

c0837sb/> newfs -F vxfs -o largefiles /dev/vg100/l100
vxfs newfs: /dev/vg100/l100 is not a character device

Patrick Wallek
Honored Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

Notice the command syntax I gave -- newfs requires the use of the 'r'aw device -- /dev/vg100/rl00 -- notice the 'r' in front of the l100 lvol name.
A. Clay Stephenson
Acclaimed Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

Again, the error message is self-explanatory:

newfs -F vxfs -o largefiles /dev/vg100/l100

You are using the BLOCK device node rather than the CHARACTER device node, /dev/vg100/rl100.
If it ain't broke, I can fix that.
Eberno
Regular Advisor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

My friend,

Im sorry for my error.. e Thanks..

very points for everybody...
Greg Rudd01
Occasional Contributor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

With the restriction on lv creation/extenstion does HP plan to remove these restrictions in a future release of HP-UX to make creating and extending volume groups similar to that in linux
Arh well Thats how it is
Eberno
Regular Advisor

Re: lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize

Thanks, for you information.