LVM是Linux系统中对磁盘分区进行管理的一种逻辑机制,它是建立在硬盘和分区之上、文件系统之下的一个逻辑层,在建立文件系统时屏蔽了下层的磁盘分区布局,能够在保持现有数据不变的情况下动态调整磁盘容量,从而提高磁盘管理的灵活性。
其实系统默认就有这个卷组:
[root@centos8 ~]# vgdisplay
--- Volume group ---
VG Name cl
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 79.80 GiB
PE Size 4.00 MiB
Total PE 20429
Alloc PE / Size 20429 / 79.80 GiB
Free PE / Size 0 / 0
VG UUID cAD3Mx-cHvj-jP05-dnHd-KpTj-z9Nd-VbFrbI
交换分区、根分区默认就使用了逻辑卷:
[root@centos8 ~]# lvdisplay
--- Logical volume ---
LV Path /dev/cl/swap
LV Name swap
VG Name cl
LV UUID obone0-20nl-Txhr-l6Vq-HadV-dCXD-RHpp3P
LV Write Access read/write
LV Creation host, time centos8.zhuohua.store, 2020-01-29 13:10:40 +0800
LV Status available
# open 2
LV Size 4.00 GiB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/cl/root
LV Name root
VG Name cl
LV UUID wuM8ey-9lxk-XAqv-U6hF-aQwY-oeOq-1ipcow
LV Write Access read/write
LV Creation host, time centos8.zhuohua.store, 2020-01-29 13:10:41 +0800
LV Status available
# open 1
LV Size 75.80 GiB
Current LE 19405
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
查看根分区所使用的逻辑卷:
[root@centos8 ~]# lvdisplay /dev/cl/root
--- Logical volume ---
LV Path /dev/cl/root
LV Name root
VG Name cl
LV UUID wuM8ey-9lxk-XAqv-U6hF-aQwY-oeOq-1ipcow
LV Write Access read/write
LV Creation host, time centos8.zhuohua.store, 2020-01-29 13:10:41 +0800
LV Status available
# open 1
LV Size 75.80 GiB
Current LE 19405
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0