Operating System - HP-UX
1833822 Members
2438 Online
110063 Solutions
New Discussion

Re: allocating a logical volume to a certain disk in a volume group

 
SOLVED
Go to solution
Jerry Sims
Advisor

allocating a logical volume to a certain disk in a volume group

Can I assign a locgical volume to a certain
disk in the volume group ?
Learn More
4 REPLIES 4
Marco Santerre
Honored Contributor
Solution

Re: allocating a logical volume to a certain disk in a volume group

Yes you can. What you have to do is basically create your logical volume by just assigning a name and then when you extend you specify the disk.

# lvcreate -n lvol10 vg01
# lvextend -l 300 /dev/vg01/lvol10 /dev/dsk/c1t1d0
Cooperation is doing with a smile what you have to do anyhow.
James R. Ferguson
Acclaimed Contributor

Re: allocating a logical volume to a certain disk in a volume group

Hi Jerry:

Yes, in two steps. You must allocate the logical volume with a ZERO-size with 'lvcreate'. Then, use 'lvextend' to specify the real size (increase) and specify the *physical* volume then. See the man pages for 'lvcreate' and 'lvextend' for more information.

Regards!

...JRF...
RAC_1
Honored Contributor

Re: allocating a logical volume to a certain disk in a volume group

lvcreate and then lvextend.

lvextend -L new_size lvol_name pv_name.

or you user pvmove also.

Check man pages.
There is no substitute to HARDWORK
Helen French
Honored Contributor

Re: allocating a logical volume to a certain disk in a volume group

Yes. Create the LV with "0" size first (lvcreate) and then use lvextend command to extend the LV to the required size and specify the pv name there:

# lvcreate -L 0 lv_name
# lvextend -L new_or_required_size lv_name pv_path
Life is a promise, fulfill it!