You are not logged in.
Below is my systemd enabled mnt-NFSDrive.mount file to mount my nfs drive.
[Unit]
Description=Mount Share at boot
[Mount]
What=myserver:/media
Where=/mnt/NFSDrive
Options=noauto
Type=nfs
TimeoutSec=30
ForceUnmount=true
[Install]
WantedBy=multi-user.targetWhat are the Options I need to ensure that if the myserver is unavailable then it should continue to boot into the desktop?
As of now this hangs on boot and shows a black screen, with a cursor, without getting into the desktop.
Let me know your thoughts and suggestions.
Thanks,
OZooHA
Last edited by ozooha (2021-01-24 16:59:00)
Offline
"noauto" should™ prevent the mount from happen… well, automatically.
Ensure that this is the offending file and there's no other reference to that FS.
Then remove the unit, add an fstab entry
myserver:/media /mnt/NFSDrive nfs users,intr,noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,actimeo=3,noatime,soft,bg,proto=tcp,mountproto=tcp 0 0and see how that behaves.
(What you can expect is that the FS isn't mounted until you try to access /mnt/NFSDrive and soft-fails w/o permanently stalling the foregound process, eg. your shell)
Offline
The point of my post was not use the fstab way as you suggested but to go with the systemd way.
Can I port some of those fstab options into systemd? if yes, which ones are those?
OZooHA
Offline
The point of my post was not use the fstab way as you suggested but to go with the systemd way.
Can I port some of those fstab options into systemd? if yes, which ones are those?
See the FSTAB section of man 5 systemd.mount.
Offline
The point of my post was not use the fstab way as you suggested but to
make your life harder…
Default Dependencies
The following dependencies are added unless DefaultDependencies=no is set:• All mount units acquire automatic Before= and Conflicts= on umount.target in order to
be stopped during shutdown.• Mount units referring to local file systems automatically gain an After= dependency on
local-fs-pre.target, and a Before= dependency on local-fs.target unless nofail mount
option is set.• Network mount units automatically acquire After= dependencies on remote-fs-pre.target,
network.target and network-online.target, and gain a Before= dependency on
remote-fs.target unless nofail mount option is set. Towards the latter a Wants= unit
is added as well.
…
When reading /etc/fstab a few special mount options are understood by systemd which
influence how dependencies are created for mount points. systemd will create a dependency
of type Wants= or Requires= (see option nofail below), from either local-fs.target or
remote-fs.target, depending whether the file system is local or remote.
…
noauto, auto
With noauto, the mount unit will not be added as a dependency for local-fs.target or
remote-fs.target. This means that it will not be mounted automatically during boot,
unless it is pulled in by some other unit. The auto option has the opposite meaning
and is the default. Note that the noauto option has an effect on the mount unit itself
only — if x-systemd.automount is used (see above), then the matching automount unit
will still be pulled in by these targets.
Offline
So appending nofail did the trick.
Offline