Comment 4 for bug 1419623

Revision history for this message
Martin Pitt (pitti) wrote : Re: systemd unmounts partitions from fstab

Tim: Can you please try "sudo systemctl disable cgmanager"? If you have lxcfs installed, then please disable that as well. Can you then please reboot a few times and check if everything works then? This worked for me. (It seems to be cgmanager; lxcfs pulls this in as well, so that one needs to be disabled too).

Debugging notes: Lennart suggested that the "dead -> mounted" looks fishy: from systemd itself it would first go to "mounting", and it would log its "mount" calls too; indeed on a working boot I see:

Feb 11 22:55:59 donald systemd[1]: Installed new job home.mount/start as 49
Feb 11 22:55:59 donald systemd[1]: Installed new job dev-disk-by\x2duuid-f86539b0\x2d3a1b\x2d4372\x2d83b0\x2dacdd029ade68.device/start as 48
Feb 11 22:55:59 donald systemd[1]: Expecting device dev-disk-by\x2duuid-f86539b0\x2d3a1b\x2d4372\x2d83b0\x2dacdd029ade68.device...
Feb 11 22:56:00 donald systemd[1]: dev-disk-by\x2duuid-f86539b0\x2d3a1b\x2d4372\x2d83b0\x2dacdd029ade68.device changed dead -> plugged
Feb 11 22:56:00 donald systemd[1]: Job dev-disk-by\x2duuid-f86539b0\x2d3a1b\x2d4372\x2d83b0\x2dacdd029ade68.device/start finished, result=done
Feb 11 22:56:02 donald systemd[1]: home.mount changed dead -> mounting
Feb 11 22:56:02 donald systemd[1]: home.mount changed mounting -> mounting-done
Feb 11 22:56:02 donald systemd[1]: Job home.mount/start finished, result=done
Feb 11 22:56:02 donald systemd[1]: Child 530 belongs to home.mount
Feb 11 22:56:02 donald systemd[1]: home.mount mount process exited, code=exited status=0
Feb 11 22:56:02 donald systemd[1]: home.mount changed mounting-done -> mounted
Feb 11 22:56:04 donald systemd[1335]: dev-disk-by\x2duuid-f86539b0\x2d3a1b\x2d4372\x2d83b0\x2dacdd029ade68.device changed dead -> plugged
Feb 11 22:56:04 donald systemd[1335]: home.mount changed dead -> mounted

which is how it's supposed to look like; but in the failed case, something is mounting/unmounting /home (and other fstab partitions) during early boot. I replaced /bin/mount and /bin/umount with a wrapper which logs the calls to "mount"; nothing calls umount during boot, and in the successful case I see systemd doing all the mounts, in the failing case they are completely missing. That indicates that the other thing that's messing with the mounts is not calling the binary but the mount() syscall.