我在 1TB 驱动器上手动分区,全新安装了 32 位 Xubuntu。缺少交换分区,无法使用以下方法更改较大的 lvm 大小分区。我想减小大小以创建 4 GB 交换分区。我必须擦除驱动器并重新分区整个吗?
这是我的fdisk
。
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b367a
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 462847 230400 83 Linux
/dev/sda2 501758 1953523711 976510977 5 Extended
/dev/sda3 462848 499711 18432 83 Linux
/dev/sda5 501760 1953523711 976510976 8e Linux LVM
Partition table entries are not in disk order
Disk /dev/sdb: 4007 MB, 4007264256 bytes
124 heads, 62 sectors/track, 1018 cylinders, total 7826688 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000babde
Device Boot Start End Blocks Id System
/dev/sdb1 * 62 7826383 3913161 7 HPFS/NTFS/exFAT
Disk /dev/mapper/xubuntu-root: 998.9 GB, 998894469120 bytes
255 heads, 63 sectors/track, 121442 cylinders, total 1950965760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/xubuntu-root doesn't contain a valid partition table
Disk /dev/mapper/xubuntu-swap_1: 1002 MB, 1002438656 bytes
255 heads, 63 sectors/track, 121 cylinders, total 1957888 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/xubuntu-swap_1 doesn't contain a valid partition table
bud@bud-desktop:~$
答案1
可能 gparted 无法调整 lvm 内的逻辑卷大小。但是,有一个图形工具可以完成此操作:
sudo apt-get install system-config-lvm
sudo system-config-lvm
希望这能有所帮助