cube1us
January 18th, 2018, 07:28 PM
I recently upgraded a pair of Ubuntu systems from 12.04 LTS to 14.04 LTS and then immediately to 16.04.3 LTS (xenial).
One of the systems seems fine. The other, however has the following issue. MOST of the time (say 3/4 of the time) the root file system mounts readonly. Once in a while, it mounts r/w, and everything is fine. The file system always checks just fine.
It looks like there may be a race condition between systemd-remount-fs.service and local-fs-pre.target and local-fs.target (note: systemd is brand new to me).
Here are the messages from dmesg that seem to be relevant:
[ 8.437943] EXT4-fs (sda3): mounting ext3 file system using the ext4 subsystem
[ 8.450833] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 14.067811] systemd[1]: local-fs.target: Found dependency on systemd-remount-fs.service/start
[ 14.067985] systemd[1]: local-fs.target: Found dependency on systemd-remount-fs.service/start
[ 14.067998] systemd[1]: local-fs.target: Breaking ordering cycle by deleting job systemd-remount-fs.service/start <<<<<< THE PROBLEM?
[ 14.068001] systemd[1]: systemd-remount-fs.service: Job systemd-remount-fs.service/start deleted to break ordering cycle starting with local-fs.target/start
[ 14.069203] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 30.466038] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[ 30.482607] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 40.129605] cgroup: new mount options do not match the existing superblock, will be ignored
The result is that the desktop does not start, etc. etc. However, if I then log in via SSH and do:
# systemctl start systemd-remount-fs.service
Then the root file system mounts just fine.
My /etc/fstab is shown below (Note, the comments identifying the devices /dev/sdb3, /dev/sdb1 and /dev/sde2 are no longer relevant. They date back to when this system had multiple disks. In fact / is /dev/sda3 and /boot is /dev/sda1 and swap is /dev/sda2 .
# /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
[rants about systemd withheld for now.]
One of the systems seems fine. The other, however has the following issue. MOST of the time (say 3/4 of the time) the root file system mounts readonly. Once in a while, it mounts r/w, and everything is fine. The file system always checks just fine.
It looks like there may be a race condition between systemd-remount-fs.service and local-fs-pre.target and local-fs.target (note: systemd is brand new to me).
Here are the messages from dmesg that seem to be relevant:
[ 8.437943] EXT4-fs (sda3): mounting ext3 file system using the ext4 subsystem
[ 8.450833] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 14.067811] systemd[1]: local-fs.target: Found dependency on systemd-remount-fs.service/start
[ 14.067985] systemd[1]: local-fs.target: Found dependency on systemd-remount-fs.service/start
[ 14.067998] systemd[1]: local-fs.target: Breaking ordering cycle by deleting job systemd-remount-fs.service/start <<<<<< THE PROBLEM?
[ 14.068001] systemd[1]: systemd-remount-fs.service: Job systemd-remount-fs.service/start deleted to break ordering cycle starting with local-fs.target/start
[ 14.069203] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 30.466038] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[ 30.482607] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 40.129605] cgroup: new mount options do not match the existing superblock, will be ignored
The result is that the desktop does not start, etc. etc. However, if I then log in via SSH and do:
# systemctl start systemd-remount-fs.service
Then the root file system mounts just fine.
My /etc/fstab is shown below (Note, the comments identifying the devices /dev/sdb3, /dev/sdb1 and /dev/sde2 are no longer relevant. They date back to when this system had multiple disks. In fact / is /dev/sda3 and /boot is /dev/sda1 and swap is /dev/sda2 .
# /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
[rants about systemd withheld for now.]