[systemd-devel] fstab Mounts Not Getting Waken Up
Lennart Poettering
lennart at poettering.net
Fri Jul 12 09:32:17 PDT 2013
On Fri, 12.07.13 09:18, CACook at Quantum-Sci.com (CACook at Quantum-Sci.com) wrote:
> >>Reindl, thank goodness you're listening. Have you by chance, tried this
> >>with auto, to see whether it automounts on wake from suspend?
> >
> >systemd doesn't unmount the fs on suspend, why should it mount it on resume?
> >
> >Maybe you are mixing up what "auto" means.
>
> Why is everyone so uptight here?
>
> No, I am not mixing up what "auto" means. Auto is supposed to mean
> that it --mounts automatically--, period, like the word says. But
> it does not, as you can see.
No. "auto" means, mount automatically at boot. It's not about resume or
anything like that.
See fstab(5), where "noauto" is explained:
noauto do not mount when "mount -a" is given (e.g., at boot
time)
There is no mention of resume time and no distro ever handled it like
that.
> If "auto" does not make it mount automatically on wake for some
> reason, THEN WHAT WILL? That is the real question here. Why won't
> it mount on WAKE? The point is -not- to argue what "auto" means.
Suspend/resume is supposed to minimally interfere with system state. If
the admin unmounted a file system from fstab and does a suspend/resume
cycle it should not get remounted magically.
> The question is about how to make the drive mount on wake. Do we
> prefer to nit-pick, or to advance the cause? The goal is to make
> this drive mount on wake, a very common function.
There are certainly friendlier ways to ask for help.
You could Add
"ExecStopPost=/usr/bin/systemctl start foobar.mount" to
systemd-suspend.service or similar. (For that create a .conf drop-in
file in /etc/systemd/system/systemd-suspend.service)
YMMV as network mounts like this usually need to be mounted only after
the network is back up. And there's simply no infrastructure for that in
place right now.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list