W skrócie
Nowy dysk
fdisk /dev/sdq
n
p
1
t 8e
w
-
pvcreate /dev/sdq1
vgdisplay
vgextend vgpool /dev/sdq1
lvextend -L+10G /dev/lvpool/root .... plus 10GB
lvextend -l +100%FREE /dev/lvpool/root ..... cale wolne miejsce
resize2fs /dev/lvpool/root
In our previous article we told you what LVM is and what you may want to use it for, and today we are going to walk you through some of the key management tools of LVM so you will be confident when setting up or expanding your installation.
As stated before, LVM is a abstraction layer between your operating system and physical hard drives. What that means is your physical hard drives and partitions are no longer tied to the hard drives and partitions they reside on. Rather, the hard drives and partitions that your operating system sees can be any number of separate hard drives pooled together or in a software RAID.
To manage LVM there are GUI tools available but to really understand what is happening with your LVM configuration it is probably best to know what the command line tools are. This will be especially useful if you are managing LVM on a server or distribution that does not offer GUI tools.
Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following:
- Physical Volume = pv
- Volume Group = vg
- Logical Volume = lv