Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

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
        

 
 
  Published under the terms of the GNU General Public License Design by Interspire