You are not logged in.
Pages: 1
Hello,
is there any way to to call a script:
* before
and
* after
the systemd fs mounts (from fstab)? Like "init_bottom" from initd. Maybe this is possible via a .service file, but wich triggers i have to set ("RequiedBy" and so), that it will be called in the right moment?
Or, would be there a way to replace fstab and make a own mount script?
Greetings,
Sebastian
Last edited by Arakis (2015-07-19 14:40:49)
Offline
What are you trying to do?
Read the wiki, maybe it has answers to your questions.
Offline
Already done, but i do not know the name of "Requires=" to trigger my systemd unit immediately after the fs-mount, so i can overlay specific directories.
I need to have a pure RO system, with RW to a tmpfs / other partition.
Is i read here ( http://www.freedesktop.org/software/sys … mount.html ) i can use x-systemd.requires. In the moment, the root-file-system is mounted and the fstab is processed/mount units will generated and mounted, are there already running processes, that have file / Inode-references to /var, /usr, /etc? Because i want to overlay them in-place (overshadow) (for example: /var (rw) = overlayfs original /var (ro) + /tmp/var (rw)).
I'm not sure, if my way is correct.
Last edited by Arakis (2015-07-19 15:29:09)
Offline
I use now a fuse mount within the fstab and use the x-systemd.requires option.
But in this moment, there are still processes, that opend write files.
For example:
/var/log/journal/...., a file is opend, even during the fstab-mount moment. When i overshadow /var now with an overlayfs overlay, (it generally works), journald complaints about "Invalid Argument" when accessing its /var/log/journal/... file. Even a service restart does not help. I solve "this" case now by Storage=volatile in the journald.conf, but this is only a workarround.
Another problem was, when there is a Xorg.log (owned by root), X-Server complaints about "unable to move xorg.log to xorg.log.old". Wheni do this step by hand, it works. It works generally when not using an overlay.
Offline
Pages: 1