← Back to team overview

touch-packages team mailing list archive

[Bug 1540803] Re: systemd doesn't respect /etc/fstab for internal mounts

 

Some context: This was motivated on real hardware, not containers. For
"full" installations like VMs or real-iron the initrd already mounts
/run, and if it is already mounted then systemd won't touch it. As there
is no initrd in containers,
https://github.com/systemd/systemd/blob/master/src/core/mount-setup.c
will kick in and mount early stuff like /run, /proc/, etc. We can't
influence  mounts from mount-setup.c with fstab as this happens (and
needs to happen) before /etc/fstab even gets parsed. But we could either
make initramfs-tools look at fstab and mount /run differently
(preferred), or remount /run etc. later in the game (that sounds racy,
inelegant, and might fail if you have options which can't be applied on
remount; I don't like that very much).

** Changed in: systemd (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1540803

Title:
  systemd doesn't respect /etc/fstab for internal mounts

Status in systemd package in Ubuntu:
  Triaged

Bug description:
  Under upstart, I can have the following line in my /etc/fstab:
      tmpfs /run tmpfs defaults,size=10M 0 0 

  At mount time, mountall will use /etc/fstab as an override for the
  internal fstab (/lib/init/fstab) and so I end up with /run mounted
  with a 10MB limit.

  Under systemd, the exact same fstab appears to be ignored and I end up
  with a /run that has a limit of half my memory.

  This may very well surprise users upgrading production environments
  from 14.04 to 16.04 or users that have to follow some strict
  partitioning and mount configuration policies (we've seen a couple of
  those by now) so it'd be good to have this resolved.

  
  I did testing with /run in LXD containers on 14.04 (upstart) and 16.04 (systemd).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1540803/+subscriptions


References