This tutorial provides a lvcreate example showing you how to create a logical volume in Linux. The examples below assume you have free space in your existing Logical Group (LG for short), the operating system I am creating the LV’s on is CentOS however this should work on any other linux distro Ubuntu, Debian etc however you may find other distros structure the way they create LG’s and LV’s differently. Fedora, Redhat, CentOS should keep a similar structure to below.
lvcreate – create logical volume called backups
The lvcreate example below will create a logical volume with 120Gb Logical Volume called “backups” in Volume Group “vg00” (to find out what you VG is called run “vgdisplay”).
Create file system on Logical Volume
To create a ext3 filesystem on the new logical volume you just created, run the following:
You probably want this partition to be auto mounted at boot, so create the /etc/fstab entry for /backups:
Create mount point for Logical Volume in Linux
Don’t forget to create the mount point!
Test this mounts before you reboot to avoid a failed startup… The last thing you want if you are working remotely.
The curser should drop to the line below, like so:
That’s all there is to creating a logical volume with lvcreate, formatting it with an ext3 file system and mounting it at boot.