Re: [systemd-devel] automount behavior with multiple IPS

2021-01-24 Thread Mantas Mikulėnas
On Sun, Jan 24, 2021, 20:58 Weatherby,Gerard  wrote:

> When systemd-automount queries an NFS server with multiple IPs, does it
> try all of the them (the default behavior of the similar autofs package) or
> just use one, or something else?
>

Systemd does not have any special handling for NFS – it will not query the
server at all; it will more or less just spawn the standard `mount` command
and let it handle the rest. If the hostname resolves to multiple addresses,
I assume that will be handled by nfs-utils' `mount.nfs` somehow.

(systemd .automount units only use autofs as the trigger for activating a
regular .mount, so everything is the same between e.g. fstab-mounted and
systemd-automounted filesystems.)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] automount behavior with multiple IPS

2021-01-24 Thread Weatherby,Gerard
When systemd-automount queries an NFS server with multiple IPs, does it try all 
of the them (the default behavior of the similar autofs package) or just use 
one, or something else?

--
Gerard Weatherby | Application Architect
NMRbox | Department of Molecular Biology and Biophysics | UConn Health
263 Farmington Avenue, Farmington, CT 06030-6406
uchc.edu
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Automount behavior

2013-07-16 Thread Lennart Poettering
On Sun, 16.06.13 22:32, Mickaël THOMAS (micka...@gmail.com) wrote:

 
 I've also found another issue regarding this (it's a small issue but still...)
 
 Using nofail (and implied auto) works as expected but if the
 device is not there at boot time, systemd will try to mount it anyway
 and fail after a certain timeout.
 Problem is, if I happen to shutdown my machine before the timeout
 ends, it will hang until the timeout has passed.
 Ideally, I don't need systemd to try to mount the device if the disk
 isn't there. Perhaps this could be the behavior when nofail option
 is used.
 
 What's your thoughts about this?

Oh, umm. So nofail is not supposed to cause delays at boot
really. This really should just mount the fs if it is found during
early-boot. If it isn't found it shouldn't get mounted or anything
delayed for it.

if this causes a delay for you then there's a bug somewhere.

What's the precise fstab line you use now?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Automount behavior

2013-07-16 Thread Mickaël THOMAS
Here are some details.

fstab line :
LABEL=Data/dataext4nofail,auto01

journalctl -b | grep Data :
Jul 17 04:24:21 mickael-laptop systemd[1]: Expecting device
dev-disk-by\x2dlabel-Data.device...
Jul 17 04:25:51 mickael-laptop systemd[1]: Job
dev-disk-by\x2dlabel-Data.device/start timed out.
Jul 17 04:25:51 mickael-laptop systemd[1]: Timed out waiting for
device dev-disk-by\x2dlabel-Data.device.
Jul 17 04:25:51 mickael-laptop systemd[1]: Dependency failed for
File System Check on /dev/disk/by-label/Data.

systemctl list-jobs (before timeout) :
JOB UNIT   TYPE  STATE
 11 data.mount start waiting
 12 systemd-fsck@dev-disk-by\x2dlabel-Data.service start waiting
 13 dev-disk-by\x2dlabel-Data.device   start running

When shutting down, the message A start job is running for
dev-disk-by\x2dlabel-Data.device shows up and I have to wait for the
timeout to end.

For now, a workaround I found is to change auto to noauto and
symlink dev-disk-by\\x2dlabel-Data.device.wants/data.mount to
/run/systemd/generator/data.mount
Disabling the file-system check also seems to fix the issue
(discovered that just now)

2013/7/17 Lennart Poettering lenn...@poettering.net:
 On Sun, 16.06.13 22:32, Mickaël THOMAS (micka...@gmail.com) wrote:


 I've also found another issue regarding this (it's a small issue but 
 still...)

 Using nofail (and implied auto) works as expected but if the
 device is not there at boot time, systemd will try to mount it anyway
 and fail after a certain timeout.
 Problem is, if I happen to shutdown my machine before the timeout
 ends, it will hang until the timeout has passed.
 Ideally, I don't need systemd to try to mount the device if the disk
 isn't there. Perhaps this could be the behavior when nofail option
 is used.

 What's your thoughts about this?

 Oh, umm. So nofail is not supposed to cause delays at boot
 really. This really should just mount the fs if it is found during
 early-boot. If it isn't found it shouldn't get mounted or anything
 delayed for it.

 if this causes a delay for you then there's a bug somewhere.

 What's the precise fstab line you use now?

 Lennart

 --
 Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Automount behavior

2013-06-10 Thread Lennart Poettering
On Sun, 09.06.13 19:59, Mickaël THOMAS (micka...@gmail.com) wrote:

 Hi,
 
 I was trying to achieve automatic mounting of my external hard drive
 whenever it's plugged in.
 
 I first tried the x-systemd.automount option in /etc/fstab but that
 led to problems when the disk is not plugged (KDE/GTK file dialogs
 hang indefinitely because they wait for the disk to be mounted).
 Setting x-systemd.device-timeout didn't seem to change anything.
 
 I finally got it working by creating this data.target file and enabling it
 
 [Unit]
 After=dev-disk-by\x5cx2dlabel-Data.device
 Conflicts=umount.target
 Before=umount.target
 Requires=data.mount
 
 [Install]
 # I had to escape \x2d here
 WantedBy=dev-disk-by\x5cx2dlabel-Data.device
 
 I still feel systemd should have this mount on insert feature
 integrated (and configurable from fstab). Also there should be a way
 for automount to behave in a non-blocking way (having it error out
 directly if the device is not there).

Passing auto,nofail should do that for you. (Since auto is the implied
default, just passing nofail suffices too). 

nofail will cause the device to be mounted at boot if it is there or
later on if it shows up.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Automount behavior

2013-06-09 Thread Mickaël THOMAS
Hi,

I was trying to achieve automatic mounting of my external hard drive
whenever it's plugged in.

I first tried the x-systemd.automount option in /etc/fstab but that
led to problems when the disk is not plugged (KDE/GTK file dialogs
hang indefinitely because they wait for the disk to be mounted).
Setting x-systemd.device-timeout didn't seem to change anything.

I finally got it working by creating this data.target file and enabling it

[Unit]
After=dev-disk-by\x5cx2dlabel-Data.device
Conflicts=umount.target
Before=umount.target
Requires=data.mount

[Install]
# I had to escape \x2d here
WantedBy=dev-disk-by\x5cx2dlabel-Data.device

I still feel systemd should have this mount on insert feature
integrated (and configurable from fstab). Also there should be a way
for automount to behave in a non-blocking way (having it error out
directly if the device is not there).

Thanks.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel