Linux Online Advertisement
[ Register ]

[ Applications ]
[ Documentation ]
[ Distributions ]
[ Download Info ]
[ General Info ]
[ Book Store ]

Advertisement

[ Courses ]
[ News ]
[ People ]
[ Hardware ]
[ Vendors ]
[ Projects ]
[ Events ]
[ User Groups ]
[ User Area ]

Running Linux, Fourth Edition

[ About Us ]
[ Home Page ]
[ Advertise ]

Creating a logical volume

11.7. Creating a logical volume

To create a 1500MB linear LV named 'testlv' and its block device special '/dev/testvg/testlv':

# lvcreate -L1500 -ntestlv testvg
        

To create a 100 LE large logical volume with 2 stripes and stripe size 4 KB.

# lvcreate -i2 -I4 -l100 -nanothertestlv testvg
        

If you want to create an LV that uses the entire VG, use vgdisplay to find the "Total PE" size, then use that when running lvcreate.

# vgdisplay testvg | grep "Total PE"
Total PE              10230
# lvcreate -l 10230 testvg -n mylv
        
This will create an LV called mylv filling the testvg VG.

If you want the logical volume to be allocated from a specific physical volume in the volume group, specify the PV or PVs at the end of the lvcreate command line.

# lvcreate -L 1500 -ntestlv testvg /dev/sdg
        



Comments: feedback (at) linux.org
Advertising: banners (at) linux.org
Copyright Linux Documentation Project.
Compilation ©1994-2008 Linux Online, Inc.
All rights reserved.