我安装了带有 LVM 的 Ubuntu 21.10,以便在磁盘上使用完全加密。它运行良好,唯一的问题是它选择了 1gb 交换分区大小,而我有 16gb 或内存...
me@me:~$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
vgubuntu 1 2 0 wz--n- <475,71g 0
me@me:~$ sudo lvdisplay
--- Logical volume ---
LV Path /dev/vgubuntu/root
LV Name root
VG Name vgubuntu
LV UUID ky0PoX-T89V-D2IG-zmfk-gofT-dD0o-A4gC4g
LV Write Access read/write
LV Creation host, time ubuntu, 2021-11-07 22:06:47 +0100
LV Status available
# open 1
LV Size 474,75 GiB
Current LE 121536
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/vgubuntu/swap_1
LV Name swap_1
VG Name vgubuntu
LV UUID cLXRIh-3Tjp-fzUn-mKwe-akK0-4hPr-9I7l3c
LV Write Access read/write
LV Creation host, time ubuntu, 2021-11-07 22:06:47 +0100
LV Status available
# open 2
LV Size 980,00 MiB
Current LE 245
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
但当我尝试延长时,我得到了这个
me@me:~$ sudo lvextend -L+16GB /dev/vgubuntu/swap_1
Insufficient free space: 4096 extents needed, but only 0 available
增加交换的最安全方法是什么?