1833772 Members
2606 Online
110063 Solutions
New Discussion

Re: lvextend

 
SOLVED
Go to solution
hpuser_6
Advisor

lvextend

I want to use lvcreate and lvextend to create a logical volume with a specific physical volume.
any thoughts?
lvcreate /dev/vgname : will create a zero length logical volume...
how do i use lvextend to give the size of the logical volume and use a specific physical volume
thanks
4 REPLIES 4
hpuser_6
Advisor

Re: lvextend

Please ignore this question. I found the solution. thanks
Zafar A. Mohammed_1
Trusted Contributor

Re: lvextend

Read the below link chapter#6 Section Managing Disk. It explained in complete detail.
http://docs.hp.com/hpux/pdf/B2355-90742.pdf

Thanks
Zafar
John Poff
Honored Contributor

Re: lvextend

Hi,

You can do 'lvcreate /dev/vgname' to create it as you mentioned, and then do 'lvextend -L ## /dev/vgname/lvol#' where the first number is the size of the lvol in MBs and the second number is the logical volume number returned by the lvcreate command.

I prefer to do it all at once with the lvcreate command:

lvcreate -L 100 /dev/vgname

will create a 100Mb logical volume in the vgname volume group. Also, you can specify logical extents instead of size by using '-l' instead of '-L'.

JP
James R. Ferguson
Acclaimed Contributor
Solution

Re: lvextend

Hi:

Create a zero-size logical volume and then 'lvextend' it. You will note that the pv_path [or pvg_name] can not be specified by 'lvcreate' but can by 'lvextend'. For example:

# lvcreate -n lvol1 /dev/vg01
# lvextend -L 100 /dev/vg01/lvol1 /dev/dsk/cXtYdZ

See the man pages for 'lvcreate' and 'lvextend' for more information.

Regards!

...JRF...