在 Ubuntu 22.04.2 上。我试图调整包含我/home
正在使用的可用空间的分区的大小,该空间位于分区当前位置的前面/左侧。实际/home
是相关分区内的一个卷(根和交换也是如此),它可能是 CentOS 安装的一个工件,以前位于当前用于 Ubuntu 的分区内。此分区不包括/boot
,我已确保它位于同一驱动器上的另一个分区中。
lsblk -o NAME,MAJ:MIN,SIZE,FSTYPE,MOUNTPOINTS
正常启动时的输出:
NAME MAJ:MIN SIZE FSTYPE MOUNTPOINTS
loop0 7:0 4K squashfs /snap/bare/5
loop1 7:1 243.8M squashfs /snap/code/119
loop2 7:2 116.8M squashfs /snap/core/14784
loop3 7:3 55.6M squashfs /snap/core18/2697
loop4 7:4 62M squashfs /snap/core20/1587
loop5 7:5 63.3M squashfs /snap/core20/1822
loop6 7:6 72.9M squashfs /snap/core22/522
loop7 7:7 81.6M squashfs /snap/discord/150
loop8 7:8 163.3M squashfs /snap/firefox/1635
loop9 7:9 240.6M squashfs /snap/firefox/2356
loop10 7:10 80.7M squashfs /snap/gmail-app/7
loop11 7:11 164.8M squashfs /snap/gnome-3-28-1804/161
loop12 7:12 219M squashfs /snap/gnome-3-34-1804/77
loop13 7:13 400.8M squashfs /snap/gnome-3-38-2004/112
loop14 7:14 346.3M squashfs /snap/gnome-3-38-2004/119
loop15 7:15 452.4M squashfs /snap/gnome-42-2204/56
loop16 7:16 91.7M squashfs /snap/gtk-common-themes/1535
loop17 7:17 329.5M squashfs /snap/inkscape/10521
loop18 7:18 100.1M squashfs /snap/julia/74
loop19 7:19 67.3M squashfs /snap/jupyter/6
loop20 7:20 10.1M squashfs /snap/liquidctl/34
loop21 7:21 115.8M squashfs /snap/slack/68
loop22 7:22 45.9M squashfs /snap/snap-store/582
loop23 7:23 49.8M squashfs /snap/snapd/18357
loop24 7:24 304K squashfs /snap/snapd-desktop-integration/49
loop25 7:25 428K squashfs /snap/snapd-desktop-integration/57
loop26 7:26 320.4M squashfs /snap/vlc/3078
sda 8:0 2.7T
├─sda1 8:1 1M
├─sda2 8:2 15M
└─sda3 8:3 2.7T ntfs /media/ben/HDD
nvme0n1 259:0 1.8T
├─nvme0n1p1 259:1 499M ext4 /boot
├─nvme0n1p2 259:2 99M vfat /boot/efi
├─nvme0n1p3 259:3 16M
├─nvme0n1p4 259:4 1.2T ntfs
└─nvme0n1p6 259:5 145.5G LVM2_member
├─centos-swap
│ 253:0 14.6G swap [SWAP]
├─centos-home
│ 253:1 80.8G ext4 /home
└─centos-root
253:2 50G ext4 /var/snap/firefox/common/host-hunspell
/
从 USB 启动时:
NAME MAJ:MIN SIZE FSTYPE MOUNTPOINTS
loop0 7:0 2.1G squashfs /rofs
loop1 7:1 62M squashfs /snap/core20/1587
loop2 7:2 4K squashfs /snap/bare/5
loop3 7:3 163.3M squashfs /snap/firefox/1635
loop4 7:4 400.8M squashfs /snap/gnome-3-38-2004/112
loop5 7:5 45.9M squashfs /snap/snap-store/582
loop6 7:6 284K squashfs /snap/snapd-desktop-integration/14
loop7 7:7 47M squashfs /snap/snapd/16292
loop8 7:8 91.7M squashfs /snap/gtk-common-themes/1535
sda 8:0 2.7T
├─sda1 8:1 1M
├─sda2 8:2 15M
└─sda3 8:3 2.7T ntfs
sdb 8:16 28.7G iso9660
├─sdb1 8:17 3.6G iso9660 /cdrom
├─sdb2 8:18 4.1M vfat
├─sdb3 8:19 300K
└─sdb4 8:20 25.1G ext4 /var/crash
/var/log
nvme0n1 259:0 1.8T
├─nvme0n1p1 259:1 499M ext4
├─nvme0n1p2 259:2 99M vfat
├─nvme0n1p3 259:3 16M
├─nvme0n1p4 259:4 1.2T ntfs
└─nvme0n1p6 259:5 145.5G LVM2_member
├─centos-swap 253:0 14.6G swap
├─centos-home 253:1 80.8G ext4
└─centos-root 253:2 50G ext4
在 Gparted 中“停用”我想移动的分区后也是一样:
NAME MAJ:MIN SIZE FSTYPE MOUNTPOINTS
loop0 7:0 2.1G squashfs /rofs
loop1 7:1 62M squashfs /snap/core20/1587
loop2 7:2 4K squashfs /snap/bare/5
loop3 7:3 163.3M squashfs /snap/firefox/1635
loop4 7:4 400.8M squashfs /snap/gnome-3-38-2004/112
loop5 7:5 45.9M squashfs /snap/snap-store/582
loop6 7:6 284K squashfs /snap/snapd-desktop-integration/14
loop7 7:7 47M squashfs /snap/snapd/16292
loop8 7:8 91.7M squashfs /snap/gtk-common-themes/1535
sda 8:0 2.7T
├─sda1 8:1 1M
├─sda2 8:2 15M
└─sda3 8:3 2.7T ntfs
sdb 8:16 28.7G iso9660
├─sdb1 8:17 3.6G iso9660 /cdrom
├─sdb2 8:18 4.1M vfat
├─sdb3 8:19 300K
└─sdb4 8:20 25.1G ext4 /var/crash
/var/log
nvme0n1 259:0 1.8T
├─nvme0n1p1 259:1 499M ext4
├─nvme0n1p2 259:2 99M vfat
├─nvme0n1p3 259:3 16M
├─nvme0n1p4 259:4 1.2T ntfs
└─nvme0n1p6 259:5 145.5G LVM2_member
我从 USB 加载了 Ubuntu 22.04,使用 GParted “停用”该分区(仍不清楚停用和卸载之间的关系;我的目的是卸载该分区以便可以移动它,但卸载没有明确提供作为选项),排队并应用移动和调整大小以使相关分区填充它前面的空间,并在/boot
开始移动之前确认有关不移动的警告。然后我收到以下警告:
分区 6 位于 ... 已写入,但我们无法通知内核此更改,可能是因为该分区正在使用中。您应该立即重新启动,然后再进行进一步的更改。
此警告提供了继续的选项,但这样做似乎不明智。我如何(相对)安全地移动和调整分区大小?