问题:
- GParted ext4分区显示红色感叹号,Journal superblock magic number invalid 错误。
- 在分区上右键执行
检查
修复无效。 sudo mount /dev/sdb2 /mnt/
无法挂载成功
错误信息:
<i>Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: b11756c8-36d0-4612-89b1-a33f016ba277
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 uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 483328
Block count: 1933056
Reserved block count: 96652
Free blocks: 1877835
Free inodes: 483317
First block: 0
Block size: 4096
Fragment size: 4096
Group descriptor size: 64
Reserved GDT blocks: 943
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Sat Aug 21 11:45:27 2021
Last mount time: n/a
Last write time: Sat Aug 21 11:49:37 2021
Mount count: 0
Maximum mount count: -1
Last checked: Sat Aug 21 11:49:37 2021
Check interval: 0 (<none>)
Lifetime writes: 196 MB
Reserved blocks uid: 0 (user 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: 1d83fb2f-1b69-4d3b-8524-1a52667eeca0
Journal backup: inode blocks</i>
<i>dumpe2fs 1.44.1 (24-Mar-2018)
Journal superblock magic number invalid!</i>
<i>无法读取此文件系统上的内容!
因为此操作可能不可用。
原因可能是缺少某个软件包。
支持 ext4 文件系统需要下列软件包:e2fsprogs v1.41+。</i>
原因:
新的操作系统上使用系统自带的 mkfs.ext4 对文件系统进行了格式化,默认会使用一些新的的特性,这些新的特性在旧的系统上是无法使用的,即在旧的内核上不支持。
这个是不支持 has_journal
特性。
解决:
# 查看文件系统特性
sudo tune2fs -l /dev/sdb2
# 去除has_journal特性
sudo tune2fs -O ^has_journal /dev/sdb2
# 再次查看文件系统特性 has_journal是否删除
sudo tune2fs -l /dev/sdb2
注:如果要添加has_journal
特性,指令是sudo tune2fs -O has_journal /dev/sdb2
,这里不要使用。
执行日志:
步骤一:
pjw@pjw-virtual-machine:~$ sudo tune2fs -l /dev/sdb2
[sudo] pjw 的密码:
tune2fs 1.44.1 (24-Mar-2018)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: b11756c8-36d0-4612-89b1-a33f016ba277
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 uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 483328
Block count: 1933056
Reserved block count: 96652
Free blocks: 1877835
Free inodes: 483317
First block: 0
Block size: 4096
Fragment size: 4096
Group descriptor size: 64
Reserved GDT blocks: 943
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Sat Aug 21 11:45:27 2021
Last mount time: n/a
Last write time: Sat Aug 21 13:39:27 2021
Mount count: 0
Maximum mount count: -1
Last checked: Sat Aug 21 13:39:27 2021
Check interval: 0 (<none>)
Lifetime writes: 324 MB
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: 1d83fb2f-1b69-4d3b-8524-1a52667eeca0
Journal backup: inode blocks
步骤二:
pjw@pjw-virtual-machine:~$ sudo tune2fs -O ^has_journal /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
步骤三:
pjw@pjw-virtual-machine:~$ sudo tune2fs -l /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: b11756c8-36d0-4612-89b1-a33f016ba277
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 483328
Block count: 1933056
Reserved block count: 96652
Free blocks: 1894219
Free inodes: 483317
First block: 0
Block size: 4096
Fragment size: 4096
Group descriptor size: 64
Reserved GDT blocks: 943
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Sat Aug 21 11:45:27 2021
Last mount time: n/a
Last write time: Sat Aug 21 13:42:45 2021
Mount count: 0
Maximum mount count: -1
Last checked: Sat Aug 21 13:39:27 2021
Check interval: 0 (<none>)
Lifetime writes: 388 MB
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
Default directory hash: half_md4
Directory Hash Seed: 1d83fb2f-1b69-4d3b-8524-1a52667eeca0
Journal backup: inode blocks
处理结果:
处理后刷新一下设备,如图:
然后执行 sudo mount /dev/sdb2 /mnt/
挂载成功:
其他问题与参考
【问题解决】报错:EXT4-fs (mmcblk0p2): couldn‘t mount RDWR because of unsupported optional features (400)
linux操作系统故障处理-ext4文件系统超级块损坏修复
解决 EXT4 使用无法挂载