1834814 Members
2740 Online
110070 Solutions
New Discussion

Logical volume of 0 size

 
SOLVED
Go to solution
SSP_1
Regular Advisor

Logical volume of 0 size

Hi Guys,

Wanted to know how to create a logical volume of zero bytes of size.

lvcreate -L 0 /dev/vg01 - this don'e work.

Pl suggest

Obstacles exist to challenge you to keep going. Not to quit.
6 REPLIES 6
Martin Johnson
Honored Contributor

Re: Logical volume of 0 size

Leave off the "L" parameter.

HTH
Marty
Pete Randall
Outstanding Contributor
Solution

Re: Logical volume of 0 size

From man lvcreate:

"If you omit the -l and -L options, the logical volume is created with
zero length. This permits you to choose its physical volume location
when you allocate logical extents with the lvextend command (see
lvextend(1M)). If you specify -l or -L, the location is determined
automatically."


Pete


Pete
James R. Ferguson
Acclaimed Contributor

Re: Logical volume of 0 size

Hi:

You must *omit* the size option ('-L') to create a zero size logical volume.

See the 'lvcreate' man pages.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Logical volume of 0 size

Read the man pages more carefully and you will note that if you omit -L (and -l) options an LVOL of 0 length will be created. Typically this is done to enable extent-based striping using subsequent lvextend commands.

If you are doing this for performance reasons, don't expect huge improvents. The problem is that even the smallest possible PE (1MB) is still a big strip size -- which should really be in the 64KB range to distribute the I/O quickly in a round-robin fashion.


If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: Logical volume of 0 size

I'm confused.

Right after you run the lvcreate command, you have a logical volume with size zero.

Then you need lvextend to give it size.

Example.

lvcreate -C n -n schmo /dev/vg01

Created a noncontiguous logical volume called schmo

lvextend -L 100 /dev/vg01/schmo /dev/dsk/c1t1d0

Now its got 100 Megabyes of space.

What did I miss?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Caesar_3
Esteemed Contributor

Re: Logical volume of 0 size

Hello!

When you create lv without parameter of the size the size will be zero as you want.

Caesar