[systemd-devel] Suppressing automounting
Andrei Borzenkov
arvidjaar at gmail.com
Sun Sep 14 10:02:42 PDT 2014
В Thu, 11 Sep 2014 13:41:25 -0400
worley at alum.mit.edu (Dale R. Worley) пишет:
> > From: Colin Guthrie <gmane at colin.guthr.ie>
>
> > I'm maybe missing something, but in the case of mount units, isn't that
> > framework program mount(8)?
> >
> > It has a mechanism for parsing default options that apply to all mounts
> > and then calling out to the appropriate, filesystem specific mount
> > program (e.g. mount.nfs, mount.cifs, mount.crypt, mount.fuse etc. etc.)
> > if appropriate.
>
> mount does the real work, of course, but it isn't the complete
> solution, because *something* has to figure out not only that
> /bin/mount should be invoked, but what its arguments are.
This is done by systemd binary just like for any other unit type. It
spawns /bin/mount to perform actual mount.
> And as you
> can see from the unit file
>
> # Automatically generated by systemd-fstab-generator
>
> [Unit]
> SourcePath=/etc/fstab
> DefaultDependencies=no
> After=local-fs-pre.target
> Conflicts=umount.target
> Before=umount.target
>
> [Mount]
> What=/dev/Freeze02/Store2
> Where=/Store
> Type=ext4
> FsckPassNo=0
> Options=nofail,x-systemd.device-timeout=1m,defaults
>
> none of that is specified *directly* in the unit file. Some piece of
> code has to know to assemble the What, Where, Type, and Options values
> (at the very least) -- and that piece of code is what contains special
> knowledge of how to handle mount units.
>
> Dale
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list