Before we start making logical volumes we have to know what a logical volume is. A logical volume is a portion of a volume group witch is in turn an abstract representation of your physical volumes (hard drives). this allows you to treat your storage as one single volume and partition it however you see fit across hard drives.
a quick diagram of physical volumes, volume groups and logical volumes
making logical volumes is simple albeit dangerous. if you make a typo you can seriously bork the computer. first the command you want to use is lvcreate with its two most basic options -n and -L.
lvcreate -n var -L 20GiB
-n is the name option it allows you to give a name to the new partition.
-L is the size partition it allows you to choose how big the partition has to be
--you can see your logical partitions if you use the command lvdisplay--
after you have created your partition you will have to make the file system for the partition to do this you just use the command mkfs or make files system like this
mkfs <the partitions address>
--to find the partition address all you have to do is look in lvcreate it should look like any file system address--
once you have done that you have to mount it to do this you mount it like any other file system
mount <the partition's address> <directory were you want it mounted>
No comments:
Post a Comment