root@ubuntu22lts:~# vgdisplay myvg
--- Volume group ---
VG Name myvg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 2.99 GiB
PE Size 4.00 MiB
Total PE 766
Alloc PE / Size 0 / 0
Free PE / Size 766 / 2.99 GiB
VG UUID HaTT0k-GIgX-x8vr-QVki-Krpg-Vcw9-tSV6W8
2.3 基于myvg卷组创建名称为mylv1的逻辑卷LV
1
lvcreate -n mylv1 -L 512M myvg
查看逻辑卷信息lvdisplay或者lvs
LV创建路径在VG子路径下
实际上还存在于/dev/mapper/myvg-mylv1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
root@ubuntu22lts:~# lvdisplay /dev/myvg/mylv1
--- Logical volume ---
LV Path /dev/myvg/mylv1
LV Name mylv1
VG Name myvg
LV UUID Fxrfkb-7E3z-ULcC-rjre-2M1m-Sdcy-k0XIqe
LV Write Access read/write
LV Creation host, time ubuntu22lts, 2024-01-30 05:56:37 +0000
LV Status available
# open 1
LV Size 512.00 MiB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
root@ubuntu22lts:~# vgdisplay myvg
--- Volume group ---
VG Name myvg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 2.99 GiB
PE Size 4.00 MiB
Total PE 766
Alloc PE / Size 128 / 512.00 MiB
Free PE / Size 638 / 2.49 GiB
VG UUID 2v2iHd-jcx3-UWU3-8KIk-wmHe-wEb3-GCpJrS
root@ubuntu22lts:~# lvdisplay
--- Logical volume ---
LV Path /dev/myvg/mylv1
LV Name mylv1
VG Name myvg
LV UUID idp0JM-STeC-T8L3-2d27-mlzY-Uqdr-dRIcrK
LV Write Access read/write
LV Creation host, time ubuntu22lts, 2024-01-30 06:57:06 +0000
LV Status available
# open 0
LV Size 512.00 MiB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/ubuntu-vg/ubuntu-lv
LV Name ubuntu-lv
VG Name ubuntu-vg
LV UUID wmFhA3-nMff-QYRL-J7Zi-kkVb-JTaC-YRG2dF
LV Write Access read/write
LV Creation host, time ubuntu-server, 2024-01-02 04:57:37 +0000
LV Status available
# open 1
LV Size <20.00 GiB
Current LE 5119
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
root@ubuntu22lts:~# vgdisplay myvg
--- Volume group ---
VG Name myvg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 2.99 GiB
PE Size 4.00 MiB
Total PE 766
Alloc PE / Size 384 / 1.50 GiB
Free PE / Size 382 / 1.49 GiB
VG UUID 2v2iHd-jcx3-UWU3-8KIk-wmHe-wEb3-GCpJrS