我首先使用 Gparted 将一些可用空间直接放置在 /dev/sda4 上 xubuntu 安装的右侧,但它无法扩展分区以包含可用空间。
然后我在终端中尝试了以下命令。我正在使用 USB 版本的 fedora 来调整分区 /dev/sda4 的大小,其中包含我的 xubuntu 安装。下面您可以看到我多次尝试过的命令,每次都收到相同的结果。
编辑:我还在“resize2fs”之前运行“sudo e2fsck -f /dev/sda4”,但收到相同的错误。
[liveuser@localhost-live ~]$ sudo resize2fs -p /dev/sda4
resize2fs 1.45.6 (20-Mar-2020)
Please run 'e2fsck -f /dev/sda4' first.
我运行命令 e2fsck,但一切似乎都通过了。
[liveuser@localhost-live ~]$ sudo e2fsck -f /dev/sda4
e2fsck 1.45.6 (20-Mar-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Xubuntu: 382621/1310720 files (0.6% non-contiguous), 4981944/5242880 blocks
我尝试通过运行 dumpe2fs 来查看是否有任何可疑之处,但我无法判断。
[liveuser@localhost-live ~]$ sudo dumpe2fs -h /dev/sda4
dumpe2fs 1.45.6 (20-Mar-2020)
Filesystem volume name: Xubuntu
Last mounted on: /
Filesystem UUID: 77fa52e3-9d25-486f-ab3b-cf1e8532cd86
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 1310720
Block count: 5242880
Reserved block count: 262144
Free blocks: 260936
Free inodes: 928099
First block: 0
Block size: 4096
Fragment size: 4096
Group descriptor size: 64
Reserved GDT blocks: 1024
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Thu Nov 12 06:26:28 2020
Last mount time: Wed Dec 16 20:04:03 2020
Last write time: Wed Dec 16 16:59:53 2020
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 16 16:59:53 2020
Check interval: 0 (<none>)
Lifetime writes: 104 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 32
Desired extra isize: 32
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: e69bf846-11fc-4b21-8be9-a611becafcda
Journal backup: inode blocks
Checksum type: crc32c
Checksum: 0x8542198c
Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3
Journal size: 128M
Journal length: 32768
Journal sequence: 0x002fe7a6
Journal start: 0
Journal checksum type: crc32c
Journal checksum: 0x123373ce
Gparted 给出了这个日志:
GParted 1.1.0
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.3
========================================
Device: /dev/sda
Model: ATA ST750LM022 HN-M7
Serial:
Sector size: 512
Total sectors: 1465149168
Heads: 255
Sectors/track: 2
Cylinders: 2872841
Partition table: gpt
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sda1 Primary 2048 2099199 boot, esp EFI System Partition fat32 EFI BOOT
/dev/sda2 Primary 2099200 4196351 bios_grub BIOS Boot unknown
/dev/sda3 Primary 4196352 46139391 swap Swap linux-swap
/dev/sda4 Primary 46139392 300410879 Xubuntu ext4 Xubuntu
/dev/sda5 Primary 300410880 342353919 Ubuntu Gnome ext4 Ubuntu Gnome
/dev/sda6 Primary 342353920 426231807 Mac OS ext4 Mac OS
/dev/sda7 Primary 426240000 468183039 Lubuntu ext4 Lubuntu
/dev/sda8 Primary 468183040 510126079 Kubuntu ext4 Kubuntu
/dev/sda9 Primary 510126080 520611839 LXDE ext4 LXDE
/dev/sda10 Primary 520611840 562554879 Fedora ext4 Fedora
/dev/sda11 Primary 562554880 583526399 Windows ext4 Windows
/dev/sda12 Primary 583526400 583731199 ext4
/dev/sda13 Primary 583731200 583935999 ext4
/dev/sda14 Primary 583936000 584140799 ext4
/dev/sda15 Primary 584140800 584345599 ext4
/dev/sda16 Primary 584345600 626288639 Work ext4 /Work
/dev/sda17 Primary 626288640 1465147391 Storage ext4 /Storage
========================================
Device: /dev/sdb
Model: Kingston DT 101 II
Serial:
Sector size: 512
Total sectors: 31252024
Heads: 255
Sectors/track: 2
Cylinders: 61278
Partition table: none
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sdb Unpartitioned 0 31252023 iso9660 Fedora-WS-Live-33-1-2
========================================
Check and repair file system (ext4) on /dev/sda4 00:00:19 ( ERROR )
calibrate /dev/sda4 00:00:03 ( SUCCESS )
path: /dev/sda4 (partition)
start: 46139392
end: 300410879
size: 254271488 (121.25 GiB)
check file system on /dev/sda4 for errors and (if possible) fix them 00:00:16 ( SUCCESS )
e2fsck -f -y -v -C 0 '/dev/sda4' 00:00:16 ( SUCCESS )
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
382621 inodes used (29.19%, out of 1310720)
1606 non-contiguous files (0.4%)
584 non-contiguous directories (0.2%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 338128/467
4981944 blocks used (95.02%, out of 5242880)
0 bad blocks
1 large file
282523 regular files
54354 directories
9 character device files
0 block device files
0 fifos
31938 links
45684 symbolic links (43967 fast symbolic links)
42 sockets
------------
414550 files
e2fsck 1.45.6 (20-Mar-2020)
grow file system to fill the partition 00:00:00 ( ERROR )
resize2fs -p '/dev/sda4' 00:00:00 ( ERROR )
resize2fs 1.45.6 (20-Mar-2020)
Please run 'e2fsck -f /dev/sda4' first.