[systemd-devel] Suppressing automounting

Dale R. Worley worley at alum.mit.edu
Thu Sep 11 10:41:25 PDT 2014


> 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.  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


More information about the systemd-devel mailing list