cancel
Showing results for 
Search instead for 
Did you mean: 

LVM

 
SOLVED
Go to solution
Viney Kumar
Regular Advisor

LVM

Hi

I have one vg02 with pv /dev/dsk/c0t1d0,/dev/dsk/c0t2d0,/dev/dsk/c0t3d0.And i want to create one lv by using all pv




Thanks
viney
7 REPLIES
Patrick Wallek
Honored Contributor

Re: LVM

Use the lvcreate command and specify a size that encompasses all disks.

# lvcreate -L /dev/vg02

The use newfs to create the filesystem on the disk.

# newfs -F vxfs -o largefiles /dev/vg02/rlvol1

Then mount your filesystem where ever you need.
Viney Kumar
Regular Advisor

Re: LVM

hi

ya i knw but actually mi requirement is different, Let i have 3 pv with 16 GB each.And i want to create lv with 8 gb that is used all three pv's pe
TTr
Honored Contributor
Solution

Re: LVM

You need to use striping. See "man lvcreate". There are two kinds, distributed allocation (lvcreate -D y ...) and stripe scheduling (-i and -I options). The second type is recommended.
lvcreate -L MB-size -i 3 -I 128 /dev/vg02
The catch is that with striping when your disks fill up you have to add 3 disks again to vg02 to get more space.
sujit kumar singh
Honored Contributor

Re: LVM

Hi viney,

there are two ways to it, u can can create the stripped LVs or u can simply create the spanned LVs.

for the stipped LVs that will get vreated using this command.

#lvcreate -i 3 -I 32 -L 8192 /dev/vg00


ya this is true that in future u shall need 3 other disk to increase this LV if u fall short of spoace on these 3 disks.


for simple spanned volume u can do like this

#lvcreate -L 2792 /dev/vg02
#lvextend -L 5584 /dev/vg02/lvol1 /dev/dsk/c0t2d0
#lvextend -L 8376 /dev/g02/lvol1 /dev/dsk/c0t3d0


i have assumed that at the time of creating the VG u have added the PVs in the order of
/dev/dsk/c0t1d0 ,/dev/dsk/c0t2d0 ,/dev/dsk/c0t3d0.


this is a simple spanned volume and remember that it should be non-contiguos .


Regards
Sujit
sujit kumar singh
Honored Contributor

Re: LVM

hi last post that i have stated is for the spanned vol and stripd LVs.

u can also take the help of the PVGs that is crrate a file /etc/lvmpvg and add the following entries on to that.


#vi /etc/lvmpvg
VG /dev/vg02
PVG pvg0
/dev/dsk/c0t1d0
/dev/dsk/c0t2d0
/dev/dsk/c0t3d0


save and exit


and then craete the LV as u desire:


#lvcreate -L 8192 -D y -s g /dev/vg02


this will create a LV that will have the PEs distributed among all the disks in Distributed Extent Based Striping (which is different from the basic Striping as i have said in the earlier post).

yes if u want to increase this LV once u r exhuated of space on the PVs u will need to add 3 disks , else u will have to remove the -D n that is non -distibuted then u can extend this LV but u will not able to get this Distributed Extent again if u run a -D n once.


regards
sujit
sujit kumar singh
Honored Contributor

Re: LVM

hi


if u have been directly / indirectly helped by the posted relies please do nit forget to assign the points.


see this thread
http://forums1.itrc.hp.com/service/forums/helptips.do?#33



regards
sujit
Viney Kumar
Regular Advisor

Re: LVM

Thanks to all,