根文件系统大多数时候以只读方式挂载 - systemd

根文件系统大多数时候以只读方式挂载 - systemd

过去几天,我通过 /usr/bin/do-release-upgrade 将我的几个系统从 LTS 12.04 升级到了 16.04.3(先是升级到 14.04,然后是 16.04)。它们之前一直运行良好其中一个在升级后似乎没问题。另一个在大多数启动过程中最终都以只读根文件系统结束。但偶尔它会正常安装。

我已经运行了 fsck - 文件系统没有问题。我再重复一遍,文件系统本身没有问题。

dmesg 显示与根文件系统 (sda3) 和“mount”相关的这些消息

[    8.438116] EXT4-fs (sda3): mounting ext3 file system using the ext4 subsystem
[    8.451426] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   14.143079] systemd[1]: local-fs.target: Found dependency on systemd-remount-fs.service/start
[   14.143093] systemd[1]: local-fs.target: Breaking ordering cycle by deleting job systemd-remount-fs.service/start  <<<<<<<< APPARENTLY A PROBLEM <<<<<<<<<<
[   14.143096] systemd[1]: systemd-remount-fs.service: Job systemd-remount-fs.service/start deleted to break ordering cycle starting with local-fs.target/start
[   14.144423] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   37.065426] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   37.140357] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

/var/log/syslog 显示:

Jan 13 14:06:39 linux4 kernel: [  554.047976] EXT4-fs (sda3): re-mounted. Opts: (null)
Jan 13 14:09:01 linux4 kernel: [    8.464055] EXT4-fs (sda3): mounting ext3 file system using the ext4 subsystem
Jan 13 14:09:01 linux4 kernel: [    8.477996] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
Jan 13 14:09:01 linux4 kernel: [   21.336148] EXT4-fs (sda3): re-mounted. Opts: errors=remount-ro
Jan 13 14:09:01 linux4 kernel: [   36.133568] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
Jan 13 14:09:01 linux4 kernel: [   36.208451] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Jan 13 14:09:01 linux4 systemd[1]: Starting Remount Root and Kernel File Systems...
Jan 13 14:09:01 linux4 systemd[1]: Started Remount Root and Kernel File Systems.
Jan 13 14:09:09 linux4 kernel: [   52.903086] cgroup: new mount options do not match the existing superblock, will be ignored
Jan 13 14:14:28 linux4 kernel: [    8.467847] EXT4-fs (sda3): mounting ext3 file system using the ext4 subsystem
Jan 13 14:14:28 linux4 kernel: [    8.481156] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
Jan 13 14:14:28 linux4 kernel: [   27.422276] EXT4-fs (sda3): re-mounted. Opts: errors=remount-ro
Jan 13 14:14:28 linux4 systemd[1]: Starting Remount Root and Kernel File Systems...
Jan 13 14:14:28 linux4 kernel: [   42.464741] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
Jan 13 14:14:28 linux4 kernel: [   42.527596] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Jan 13 14:14:28 linux4 kernel: [   44.178553] cgroup: new mount options do not match the existing superblock, will be ignored
Jan 13 14:14:28 linux4 systemd[1]: Started Remount Root and Kernel File Systems.

mount 命令显示:

root@linux4:/var/log# mount | grep sda
/dev/sda3 on / type ext3 (ro,relatime,data=ordered)
/dev/sda1 on /boot type ext3 (rw,relatime,data=ordered)

/etc/fstab 如下所示:

(/dev/scd0、/dev/scd1、/dev/fd0 上的注释是为了排除它们的嫌疑。而且,在我进行此更改后的第一次重新启动时,系统正确启动。注释 /dev/sde1 是错误的。Swap 实际上是 /dev/sda2。并且,/ 是 /dev/sda3,/boot 是 sda1。这些注释可以追溯到 Linux 位于机器的第二个磁盘上的时候)。

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sdb3
UUID=f5e2f8ee-adac-48ad-8483-e04ae0da9580 /               ext3    relatime,errors=remount-ro 0       1
# /dev/sdb1
#UUID=2f2eef15-17d3-4886-9ffa-6666dc8ad8d4 /boot           ext3    relatime        0       2
# /dev/sde2
UUID=d6054f01-2d94-4b27-8662-3ba22ab123c9 none            swap    sw              0       0
# /dev/scd1       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
# /dev/scd0       /media/cdrom1   udf,iso9660 user,noauto,exec,utf8 0       0
# /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
UUID=2f2eef15-17d3-4886-9ffa-6666dc8ad8d4       /boot   ext3    defaults        0       2

内核是:

root@linux4:/var/log# uname -a
Linux linux4 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:07 UTC 2018 i686 i686 i686 GNU/Linux

奇怪的是,我升级的另一个系统运行的内核是 3.13.0-139-generic,而不是 4.4.0-109-generic - 尽管我仅相隔几天就对它们进行了相同的更新过程。我还尝试了内核 4.4.0.104-generic,结果相同。我之前在此系统上运行的内核是 3.2.0-69-generic-pae。

我不知所措。虽然我从 1976 年就开始使用 Unix(不,这不是打字错误),但“systemd”这个东西对我来说完全是新东西。所以,是的,我会研究它,但我希望有人能给我一些建议,告诉我应该从哪里开始研究。

我查看了“根文件系统在一段时间后以只读方式挂载”这个主题,但没有答案,而且这个主题已经有两年了。

我很难不对 systemd 的“美妙”大加赞赏 - 在我工作的许多年里,我们使用这个词来描述一些不必要的复杂和神秘(并且通常根本没有必要)的东西。

相关内容