Create Logical Volume with lvcreate
This guide walks you through creating a logical volume with lvcreate assumes 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.
The lvcreate command 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”).
lvcreate -L 120G -n backups vg00
Create an ext3 filesystem on your new Logical Volume:
mkfs.ext3 /dev/vg00/backups
You probably want this partition to be mounted at boot, so create the /etc/fstab entry for /backups:
/dev/vg00/backups /backups ext3 defaults,usrquota 0 2
Don’t forget to create the mount point!
mkdir /backups
Test this mounts before you reboot to avoid a failed startup… The last thing you want if you are working remotely
mount /backups
The curser should drop to the line below, like so:
[root@s15268599 ~]# mount /backups [root@s15268599 ~]#
(I didn’t name this server yet…).
Any problems or questions drop me a comment.