Re: [systemd-devel] systemd autofs in RH 7

2020-04-21 Thread Silvio Knizek
Am Dienstag, den 21.04.2020, 14:33 + schrieb Wieschke, Thomas:
> Hi,
> thanks fort he quick response. After having a first look at the man pages, I 
> mentioned that I would have a choice between
> a fstab based solution or a unit file based one, right?
> Because I have a mix of ~ 10 different Mounts (CIFS, NFS) /workdir/in, 
> /workdir/out, /workdir/bla, /workdir/send ...
> I have a tendency to fstab because it seems better manageable or what would 
> you suggest?
>
> BR
> Thomas
Hi Thomas,

using the fstab is the preferred interface.

BR
Silvio

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


Re: [systemd-devel] systemd autofs in RH 7

2020-04-21 Thread Wieschke, Thomas

Hi,
thanks fort he quick response. After having a first look at the man pages, I 
mentioned that I would have a choice between
a fstab based solution or a unit file based one, right?
Because I have a mix of ~ 10 different Mounts (CIFS, NFS) /workdir/in, 
/workdir/out, /workdir/bla, /workdir/send ...
I have a tendency to fstab because it seems better manageable or what would you 
suggest?

BR
Thomas


NOVENTI Health SE | Tomannweg 6  | 81673 München
Telefon +49 89 43184-153 | thomas.wiesc...@noventi.de | www.noventi.de
Vorstand: Dr. Hermann Sommer (Vorsitzender) | Dr. Sven Jansen | Victor J. Castro
Erweiterter Vorstand: Sven Bertram (CTO) | Dr. Verena Heeschen (CHRO) | Dr. 
Silvio Kusche (CMO) | Dr. Sven Simons (CCIO) |  Björn Zeien (CSO)
Aufsichtsratsvorsitzender: Uwe Geiß
Sitz der Gesellschaft: München, Registergericht München HRB 234740 | USt-IdNr.: 
DE314305075
-Ursprüngliche Nachricht-
Von: systemd-devel  Im Auftrag von 
Silvio Knizek
Gesendet: Dienstag, 21. April 2020 15:46
An: systemd-devel@lists.freedesktop.org
Betreff: Re: [systemd-devel] systemd autofs in RH 7

Am Dienstag, den 21.04.2020, 13:26 + schrieb Wieschke, Thomas:
> Hi,
> I hope someone can help with the following case.
>
> I'm writing on a RH 7 system to an automounted FS and get an disruption 
> because systemd (??) is,
> besides working in this directory, obviously trying an umount in the 
> background.
> The umount doesn't work because the FS is in use (returned busy), but the 
> start/stop of autofs is
> nevertheless done and leads to a disruption:
>
> Apr 21 12:02:18 server1 systemd[1]: Stopping Automounts filesystems on 
> demand...
> -- Subject: Unit autofs.service has begun shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has begun shutting down.
> Apr 21 12:02:19 server1 automount[22213]: umount_autofs_indirect: ask umount 
> returned busy /vsaabrmount
> Apr 21 12:02:20 server1 systemd[1]: Stopped Automounts filesystems on demand.
> -- Subject: Unit autofs.service has finished shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has finished shutting down.
> Apr 21 12:02:20 server1 systemd[1]: Starting Automounts filesystems on 
> demand...
> -- Subject: Unit autofs.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has begun starting up.
> Apr 21 12:02:20 server1 systemd[1]: Started Automounts filesystems on demand.
> -- Subject: Unit autofs.service has finished start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has finished starting up.
> --
> -- The start-up result is done.
>
> Finally I tried to prevent any umount by changing in /etc/sysconfig/autofs 
> #OPTIONS="" to OPTIONS="-timeout=0"
>
> And I tried to add in /etc/auto.master at end of line --timeout=0 (/workdir   
>  /etc/auto.workdir --timeout=0)
>
> But besides this values there is an automatic restart every 30min
>
> Apr 21 13:34:41 server1 systemd: Stopping Automounts filesystems on demand...
> Apr 21 13:34:42 server1 systemd: Starting Automounts filesystems on demand...
> Apr 21 13:34:42 server1 systemd: Started Automounts filesystems on demand.
> Apr 21 14:04:42 server1 systemd: Stopping Automounts filesystems on demand...
> Apr 21 14:04:42 server1 systemd: Stopped Automounts filesystems on demand.
> Apr 21 14:04:42 server1 systemd: Starting Automounts filesystems on demand...
> Apr 21 14:04:42 server1 systemd: Started Automounts filesystems on demand.
> Apr 21 14:34:42 server1 systemd: Stopping Automounts filesystems on demand...
> Apr 21 14:34:42 server1 automount[11019]: umount_autofs_indirect: ask umount 
> returned busy /vsaabrmount
> Apr 21 14:34:44 server1 systemd: Stopped Automounts filesystems on demand.
> Apr 21 14:34:44 server1 systemd: Starting Automounts filesystems on demand...
> Apr 21 14:34:44 server1 systemd: Started Automounts filesystems on demand.
>
> Switching back to RH 6 doesn't show this problem.
>
> Any suggestions?
>
> Thanks in advance
>
> Best regards
> Thomas

Hi Thomas,

don't use autofs, but systemd.automount for this. It does exactly what
you want, but in the context of systemd. See man:systemd.automount for
more information.

BR
Silvio

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


Re: [systemd-devel] systemd autofs in RH 7

2020-04-21 Thread Ignaz Forster
Am 21.04.20 um 15:26 Uhr schrieb Wieschke, Thomas:
> I'm writing on a RH 7 system to an automounted FS and get an disruption 
> because systemd (??) is,
> besides working in this directory, obviously trying an umount in the 
> background.
> The umount doesn't work because the FS is in use (returned busy), but the 
> start/stop of autofs is
> nevertheless done and leads to a disruption:

This sound like a bug in util-linux which was fixed upstream recently:
https://github.com/karelzak/util-linux/commit/7065cc0e5312cafc5ae3e4c342f78f264300fb5f

Cheers,
Ignaz
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd autofs in RH 7

2020-04-21 Thread Lennart Poettering
On Di, 21.04.20 13:26, Wieschke, Thomas (thomas.wiesc...@noventi.de) wrote:

>
> Hi,
> I hope someone can help with the following case.
>
> I'm writing on a RH 7 system to an automounted FS and get an disruption 
> because systemd (??) is,
> besides working in this directory, obviously trying an umount in the 
> background.
> The umount doesn't work because the FS is in use (returned busy), but the 
> start/stop of autofs is
> nevertheless done and leads to a disruption:

Something appears to stop and restart your autofs service every half
an our. try to figure out why.

>
> Apr 21 12:02:18 server1 systemd[1]: Stopping Automounts filesystems on 
> demand...
> -- Subject: Unit autofs.service has begun shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has begun shutting down.
> Apr 21 12:02:19 server1 automount[22213]: umount_autofs_indirect:
> ask umount returned busy /vsaabrmount

This is a message from your automount service, not from systemd.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd autofs in RH 7

2020-04-21 Thread Silvio Knizek
Am Dienstag, den 21.04.2020, 13:26 + schrieb Wieschke, Thomas:
> Hi,
> I hope someone can help with the following case.
>
> I'm writing on a RH 7 system to an automounted FS and get an disruption 
> because systemd (??) is,
> besides working in this directory, obviously trying an umount in the 
> background.
> The umount doesn't work because the FS is in use (returned busy), but the 
> start/stop of autofs is
> nevertheless done and leads to a disruption:
>
> Apr 21 12:02:18 server1 systemd[1]: Stopping Automounts filesystems on 
> demand...
> -- Subject: Unit autofs.service has begun shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has begun shutting down.
> Apr 21 12:02:19 server1 automount[22213]: umount_autofs_indirect: ask umount 
> returned busy /vsaabrmount
> Apr 21 12:02:20 server1 systemd[1]: Stopped Automounts filesystems on demand.
> -- Subject: Unit autofs.service has finished shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has finished shutting down.
> Apr 21 12:02:20 server1 systemd[1]: Starting Automounts filesystems on 
> demand...
> -- Subject: Unit autofs.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has begun starting up.
> Apr 21 12:02:20 server1 systemd[1]: Started Automounts filesystems on demand.
> -- Subject: Unit autofs.service has finished start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit autofs.service has finished starting up.
> --
> -- The start-up result is done.
>
> Finally I tried to prevent any umount by changing in /etc/sysconfig/autofs 
> #OPTIONS="" to OPTIONS="-timeout=0"
>
> And I tried to add in /etc/auto.master at end of line --timeout=0 (/workdir   
>  /etc/auto.workdir --timeout=0)
>
> But besides this values there is an automatic restart every 30min
>
> Apr 21 13:34:41 server1 systemd: Stopping Automounts filesystems on demand...
> Apr 21 13:34:42 server1 systemd: Starting Automounts filesystems on demand...
> Apr 21 13:34:42 server1 systemd: Started Automounts filesystems on demand.
> Apr 21 14:04:42 server1 systemd: Stopping Automounts filesystems on demand...
> Apr 21 14:04:42 server1 systemd: Stopped Automounts filesystems on demand.
> Apr 21 14:04:42 server1 systemd: Starting Automounts filesystems on demand...
> Apr 21 14:04:42 server1 systemd: Started Automounts filesystems on demand.
> Apr 21 14:34:42 server1 systemd: Stopping Automounts filesystems on demand...
> Apr 21 14:34:42 server1 automount[11019]: umount_autofs_indirect: ask umount 
> returned busy /vsaabrmount
> Apr 21 14:34:44 server1 systemd: Stopped Automounts filesystems on demand.
> Apr 21 14:34:44 server1 systemd: Starting Automounts filesystems on demand...
> Apr 21 14:34:44 server1 systemd: Started Automounts filesystems on demand.
>
> Switching back to RH 6 doesn't show this problem.
>
> Any suggestions?
>
> Thanks in advance
>
> Best regards
> Thomas

Hi Thomas,

don't use autofs, but systemd.automount for this. It does exactly what
you want, but in the context of systemd. See man:systemd.automount for
more information.

BR
Silvio

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