elite
February 5, 2026, 12:37pm
1
/etc/fstab里/home分区的配置如下:
# /dev/nvme0n1p4
UUID=4de76c3a-19b8-xxxxx /home ext4 rw,noatime,commit=60,barrier=0 0 2
启动时出现/home分区无法挂载的情况:
# systemctl status home.mount
...(略)
Feb 05 19:51:52 xxx systemd[1]: Mounting /home...
Feb 05 19:51:52 xxx mount[702]: mount: /home: wrong fs type, bad option, bad superblock on /dev/nvme0n1p4, missing codepage or helper program, or other error.
Feb 05 19:51:52 xxx mount[702]: dmesg(1) may have more information after failed mount system call.
Feb 05 19:51:52 xxx systemd[1]: home.mount: Mount process exited, code=exited, status=32/n/a
Feb 05 19:51:52 xxx systemd[1]: home.mount: Failed with result 'exit-code'.
Feb 05 19:51:52 xxx systemd[1]: Failed to mount /home.
# dmesg
...(略)
[ 3.693633] EXT4-fs (nvme0n1p4): can't mount with commit=, fs mounted w/o journal
只要把fstab里的commit=60去掉,重启就能正常挂载。
我的根分区里也有commit=60,但能正常挂载,为何唯独/home就不行呢?
依云
(lilydjwg)
February 5, 2026, 12:54pm
2
elite:
我的根分区里也有commit=60
怎么有的?你写在fstab里了?但是根文件系统是先于读取fstab挂载的。
另外你的这两个文件系统是一样的配置参数吗?用tune2fs看看?
elite
February 5, 2026, 1:11pm
3
# /dev/nvme0n1p3
UUID=f1a9d94b-xxx / ext4 rw,noatime,commit=60,barrier=0 0 1
# /dev/nvme0n1p4
UUID=4de76c3a-xxx /home ext4 rw,noatime,commit=60,barrier=0 0 2
都写在fstab里了
依云
(lilydjwg)
February 6, 2026, 4:08am
5
我让他用tune2fs看了。但是他不看我也没办法。
依云
(lilydjwg)
February 6, 2026, 1:13pm
8
sudo tune2fs -l /dev/.... 应该就可以了。
elite
February 6, 2026, 1:30pm
9
【这是根分区】
# tune2fs -l /dev/nvme0n1p3
tune2fs 1.47.3 (8-Jul-2025)
Filesystem volume name: <none>
Last mounted on: /sysroot
Filesystem UUID: f1a9d94b-723f-4ef4-97eb-409787300ee5
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: ext_attr resize_inode dir_index orphan_file filetype extent 64bit flex_bg metadata_csum_seed 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: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 2097152
Block count: 8388608
Reserved block count: 419430
Overhead clusters: 143932
Free blocks: 7322280
Free inodes: 2021186
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: Mon Feb 2 20:57:48 2026
Last mount time: Fri Feb 6 20:36:16 2026
Last write time: Fri Feb 6 20:36:17 2026
Mount count: 11
Maximum mount count: -1
Last checked: Mon Feb 2 20:57:48 2026
Check interval: 0 (<none>)
Lifetime writes: 4817 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: 682b11ba-b3b1-42f8-9c33-e67466c5ce4f
Journal backup: inode blocks
Checksum type: crc32c
Checksum: 0x1663a5cd
Checksum seed: 0x4fb2d72a
Orphan file inode: 12
【这是/home分区】
# tune2fs -l /dev/nvme0n1p4
tune2fs 1.47.3 (8-Jul-2025)
Filesystem volume name: <none>
Last mounted on: /home
Filesystem UUID: 4de76c3a-19b8-4363-ba6c-6cefb5db18f9
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: ext_attr resize_inode dir_index orphan_file filetype extent 64bit flex_bg metadata_csum_seed 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: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 16777216
Block count: 67108864
Reserved block count: 3355443
Overhead clusters: 1068527
Free blocks: 64952746
Free inodes: 16769747
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: Mon Feb 2 20:58:08 2026
Last mount time: Fri Feb 6 20:36:18 2026
Last write time: Fri Feb 6 20:36:18 2026
Mount count: 8
Maximum mount count: -1
Last checked: Mon Feb 2 20:58:08 2026
Check interval: 0 (<none>)
Lifetime writes: 9 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
Default directory hash: half_md4
Directory Hash Seed: 1557c996-e0ee-4af1-9c05-bdd0616fc221
Journal backup: inode blocks
Checksum type: crc32c
Checksum: 0xff0e568c
Checksum seed: 0x19695132
Orphan file inode: 12
依云
(lilydjwg)
February 6, 2026, 1:36pm
10
两个都缺少has_journal特性。你这是咋格式化出来的啊。
/挂载没出问题应该是你的rootflags里没有写commit选项。/home的挂载看fstab的,所以会报错。
elite
February 6, 2026, 1:39pm
11
被我tune2fs -O "^has_journal" /dev/xxx去掉了
因为据说这样能延长ssd寿命...
依云
(lilydjwg)
February 6, 2026, 1:40pm
12
好吧……那你都不要日志了,就别加日志相关的挂载选项了呀。
elite
February 6, 2026, 1:45pm
13
明白了,请问关了日志,barrier=0这个还需要吗?我不懂,这是都是照着wiki上的性能优化写的
寿命就是拿来用的。按正常使用开着 journal, 可能 5 年后老坏开始损坏丢数据;不开 journal, 那就是从第 1 天开始丢数据。
2 Likes