Operating System - HP-UX
1819691 Members
3228 Online
109605 Solutions
New Discussion юеВ

LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

 
SOLVED
Go to solution
Sukant Naik
Trusted Contributor

LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi,

By mistake in my shell script, I gave an astronomical value for the size of Logical Volume during creation.

+ /usr/sbin/lvcreate -L 1073741824 -n lvashsnap /dev/vgash
Usage: lvcreate
[-A Autobackup]
[-d Schedule]
[-i Stripes -I StripeSize]
{-l LogicalExtentsNumber |
-L LogicalVolumeSize}
[-n LogicalVolumeName]
[-p Permission]
[-r Relocate]
[-s Strict]
[-C Contiguous]
[-D Distributed]
VolumeGroupName
"LogicalVolumeSize": Must be a value between 1 and 16777216 (16M).

Why is this error being thrown to me. And all of us create Logical Volumes beyond 16MB.

When I checked the man lvcreate it shows:

-L lv_size Allocate space to the logical volume,
specified in megabytes. lv_size is a
decimal value in the range 1 to 16777216
(the implementation limit). lv_size is
rounded up to the nearest multiple of
the logical extent size, equivalent to
the physical extent size defined for the
volume group by the vgcreate command
(see vgcreate(1M)). The default is
described above.

Either the -l or the -L option can be
specified, but not both.

I am puzzled.....

-Sukant
Who dares he wins
10 REPLIES 10
pap
Respected Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi Sushank,
Just let us know what is the size of this LV which you want to set.
if you specify -L option then you need to specify size in MVBs. I mean if you want to make LV of 2GB then you need to specify

lvcreate -L 2000 -n .......

The way you mentioned in your question, the LV size will be
1073741824 means 1073741824MB.
(1073741 GB)

I do not think that you will need this much big LV for your requirements.

-l option , you have to specify zise of LV in extents. Normally (1 extent= 4Mb)

Thanks,
-pap

"Winners don't do different things , they do things differently"
David Bell_1
Honored Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Sukant,

By using the capital "L", you specified it should be in Megabytes not blocks. The number you specified is far beyond "16MB". Hence, lvcreate -L 2000 would represent 2GB.

HTH,

Dave
John Carr_2
Honored Contributor
Solution

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi

as you point out you cannot use -l and -L because they both do the same in different ways.

-L specifies the total amount of capacity to create

-l specifies the number of extents with the extent size generally being 4MB by default thus

using -L 1024 would create 1024 MB

using -l 1024 would create 4096 MB

cheers
John.
ashish nanjiani
Frequent Advisor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi Sukant

You are specifiying a size way to large than the allowed size. Since you are using -L option the no following -L should be the size in MB. In your case you are mentioning the size 1073741824M which is equal to 1073 TB, while the max size allowed in 16TB.
Helen French
Honored Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi Sukant:

The error you got and the man pages are right. But I think you mis-understood the meaning. The limit in MB is the lv_size value you can provide! And again the lv_size will be calculated in MB !

HTH,
Shiju
Life is a promise, fulfill it!
Sukant Naik
Trusted Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi,

Thanks for all your replies.

My script works fine and have used it to create LVs of size upto 100GB.

The question was the interpretation of the term

Must be a value between 1 and 16777216 (16M).

What does it mean ? Does it mean the size you specify is 16MB or the maximum value for the 'L' option is 16777216. Then in that case the maximum Logical Volume which I can create is 16777216 MB.

Because first I thought it indicates just 16MB of Logical Volume size.

I thought the forum is the best place to get all your doubts cleared and thats why I posted this query.

-Sukant
Who dares he wins
pap
Respected Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

That is maximum value for -L option.

16TB..max is allowed.

-pap
"Winners don't do different things , they do things differently"
Helen French
Honored Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi Sukant:

Again, it is the maximu value you can provide with 'L'. You can also specify the 'l' with LE numbers.

HTH,
Shiju
Life is a promise, fulfill it!
ashish nanjiani
Frequent Advisor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Here's what the man page has to say.
-L lv_size Allocate space to the logical volume,specified in megabytes. lv_size is a decimal value in the range 1 to 16777216
the implementation limit ).So it clearly means that the maz size allowed is 16777216MB.

ashish
John Carr_2
Honored Contributor

Re: LogicalVolumeSize": Must be a value between 1 and 16777216 (16M)

Hi

as pap pointed out 16777216 equates to 16 TB

16777216 /1024 = 16384 GB

16384 / 1024 = 16 terra Bytes

the large number is just confusing now we have such massive disks and file systems compared with years past.

hope you got all the answers you needed

John.