[systemd-devel] Setting mount option `sync` for root parition in fstab causes umount to fail during shutdown

Lennart Poettering lennart at poettering.net
Wed Aug 8 08:46:55 UTC 2018


On Mi, 08.08.18 09:49, Isaac Nickaein (nickaein.i at gmail.com) wrote:

> I have enabled the `sync` option in `/etc/fstab` for the root
> partition among other options. During boot systemd correctly re-mounts
> the partition with given options, but cannot umount it during
> shutdown.
> However, it complains that `sync` is unrecognized:

> 
> ...
> systemd-shutdown[1]: Unmounting file systems.
> systemd-shutdown[1]: Remounting '/' read-only with options 'sync,data=ordered'.
> EXT4-fs (mmcblk2p1): Unrecognized mount option "sync" or missing value
> systemd-shutdown[1]: Remounting '/' read-only with options 'sync,data=ordered'.
> EXT4-fs (mmcblk2p1): Unrecognized mount option "sync" or missing value

This message is generated by the kernel. This appears to be a kernel
problem: it apparently doesn't allow remounts of ext4 if we specify
"sync" in the mount options...

Please report this to the kernel folks.

When systemd shuts down it will remount all file systems read-only. It
does that by reading the old mount options from /proc/self/mountinfo
and adding MS_RDONLY to it. If the ext4 file system in the kernel
refuses that there's little we can do.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list