ubuntu 扩容逻辑卷
`Ubuntu 22.04 LTS` 在安装过程中默认只使用 100G 的硬盘,执行以下命令即可扩容
Ubuntu 22.04 LTS
在安装过程中默认只使用 100G 的硬盘,执行以下命令即可扩容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 100G 11G 89G 11% /
$ lvdisplay
--- Logical volume ---
LV Path /dev/ubuntu-vg/ubuntu-lv
LV Name ubuntu-lv
VG Name ubuntu-vg
LV Write Access read/write
LV Creation host, time ubuntu-server, 2023-10-11 10:53:11 +0000
LV Status available
# open 1
LV Size 100 GB
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 512
Block device 253:0
$ lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
$ resize2fs /dev/ubuntu-vg/ubuntu-lv
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 3.5T 11G 3.3T 1% /
This post is licensed under CC BY 4.0 by the author.