我正在尝试使用 gparted 缩小 ubuntu 16.04 扩展分区。gparted 和 vgdisplay 都显示分区已完全使用。所以我不能缩小分区。df 表示使用 5%(正确值)。 这是 GParted 的屏幕截图。
这是相关的命令行输出:
$ sudo vgdisplay
--- Volume group ---
VG Name ubuntu-vg
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 465.28 GiB
PE Size 4.00 MiB
Total PE 119112
Alloc PE / Size 119112 / 465.28 GiB
Free PE / Size 0 / 0
VG UUID wfsaCW-GdMo-5QUg-O1YD-8Xiv-kfPG-v42ICj
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 9.4M 1.6G 1% /run
/dev/mapper/ubuntu--vg-root 443G 21G 400G 5% /
tmpfs 7.9G 256K 7.9G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/sda1 472M 374M 75M 84% /boot
tmpfs 1.6G 48K 1.6G 1% /run/user/1000
/dev/sdb1 1.4G 1.4G 0 100% /media/admin/Ubuntu 16.04 LTS amd64
$ sudo lvdisplay
--- Logical volume ---
LV Path /dev/ubuntu-vg/root
LV Name root
VG Name ubuntu-vg
LV UUID 6Hr4D4-NBbX-pcbI-iVNR-CcGY-ORbh-Jaoqdm
LV Write Access read/write
LV Creation host, time ubuntu, 2016-05-09 05:32:18 -0600
LV Status available
# open 1
LV Size 449.32 GiB
Current LE 115026
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Path /dev/ubuntu-vg/swap_1
LV Name swap_1
VG Name ubuntu-vg
LV UUID ce21kC-7P1j-GLFs-YaSF-9yQj-fS3H-ZkhS2p
LV Write Access read/write
LV Creation host, time ubuntu, 2016-05-09 05:32:18 -0600
LV Status available
# open 2
LV Size 15.96 GiB
Current LE 4086
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
另请注意,这是使用 LVM 的默认安装方式安装的 ubuntu 分区。没有高级设置。我错过了什么?今天才向我介绍逻辑卷管理。谢谢!