Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #182290 > unrolled thread

cifs boot time mounts fail after ugrading to Stretch

Started byGuy Marcenac <guy@posteurs.com>
First post2017-06-18 19:40 +0200
Last post2017-06-20 18:30 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  cifs boot time mounts fail after ugrading to Stretch Guy Marcenac <guy@posteurs.com> - 2017-06-18 19:40 +0200
    Re: cifs boot time mounts fail after ugrading to Stretch guy@posteurs.com - 2017-06-20 10:10 +0200
      Re: cifs boot time mounts fail after ugrading to Stretch Greg Wooledge <wooledg@eeg.ccf.org> - 2017-06-20 14:20 +0200
        Re: cifs boot time mounts fail after ugrading to Stretch Guy Marcenac <guy@posteurs.com> - 2017-06-20 18:30 +0200

#182290 — cifs boot time mounts fail after ugrading to Stretch

FromGuy Marcenac <guy@posteurs.com>
Date2017-06-18 19:40 +0200
Subjectcifs boot time mounts fail after ugrading to Stretch
Message-ID<tTMl4-88J-9@gated-at.bofh.it>
Hello,

I just upgraded from jesie to stretch, and everything went fine.
Except my network mounts from fstab fail at boot time.

If I
# mount -a
from the prompt it works.

I tried by adding one of the mounts as a systemd mount unit, and it 
fails too.

Here are the entries from /etc/fstab:
//192.168.0.21/video/cine /root/cine/i580mt cifs 
rw,credentials=/etc/cifspasswd,_netdev  0       0
//192.168.0.21/video/tv /root/tv/i580mt cifs 
rw,credentials=/etc/cifspasswd  0       0

My syslog:
systemd[1]: Started OpenBSD Secure Shell server.
kernel: [    3.626226] FS-Cache: Netfs 'cifs' registered for caching
kernel: [    3.626273] Key type cifs.spnego registered
kernel: [    3.626277] Key type cifs.idmap registered
kernel: [    3.630942] CIFS VFS: Error connecting to socket. Aborting 
operation.
kernel: [    3.630956] CIFS VFS: Error connecting to socket. Aborting 
operation.
kernel: [    3.631234] CIFS VFS: Error connecting to socket. Aborting 
operation.
kernel: [    3.631987] CIFS VFS: cifs_mount failed w/return code = -101
kernel: [    3.631999] CIFS VFS: cifs_mount failed w/return code = -101
systemd[1]: root-tv-i580mt.mount: Mount process exited, code=exited 
status=32
kernel: [    3.633183] CIFS VFS: Error connecting to socket. Aborting 
operation.
kernel: [    3.633275] CIFS VFS: Error connecting to socket. Aborting 
operation.
kernel: [    3.633311] CIFS VFS: cifs_mount failed w/return code = -101
kernel: [    3.633866] CIFS VFS: cifs_mount failed w/return code = -101
kernel: [    3.634036] CIFS VFS: cifs_mount failed w/return code = -101
systemd[1]: Failed to mount /root/tv/i580mt.
systemd[1]: Dependency failed for Remote File Systems.
systemd[1]: remote-fs.target: Job remote-fs.target/start failed with 
result 'dependency'.
systemd[1]: root-tv-i580mt.mount: Unit entered failed state.

-- 
guy

[toc] | [next] | [standalone]


#182396

Fromguy@posteurs.com
Date2017-06-20 10:10 +0200
Message-ID<tUmoy-63S-5@gated-at.bofh.it>
In reply to#182290
Le 2017-06-18 19:30, Guy Marcenac a écrit :
> Hello,
> 
> I just upgraded from jesie to stretch, and everything went fine.
> Except my network mounts from fstab fail at boot time.
> 
> If I
> # mount -a
> from the prompt it works.
> 
> I tried by adding one of the mounts as a systemd mount unit, and it 
> fails too.
> 
> Here are the entries from /etc/fstab:
> //192.168.0.21/video/cine /root/cine/i580mt cifs
> rw,credentials=/etc/cifspasswd,_netdev  0       0
> //192.168.0.21/video/tv /root/tv/i580mt cifs
> rw,credentials=/etc/cifspasswd  0       0
> 
> My syslog:
> systemd[1]: Started OpenBSD Secure Shell server.
> kernel: [    3.626226] FS-Cache: Netfs 'cifs' registered for caching
> kernel: [    3.626273] Key type cifs.spnego registered
> kernel: [    3.626277] Key type cifs.idmap registered
> kernel: [    3.630942] CIFS VFS: Error connecting to socket. Aborting 
> operation.
> kernel: [    3.630956] CIFS VFS: Error connecting to socket. Aborting 
> operation.
> kernel: [    3.631234] CIFS VFS: Error connecting to socket. Aborting 
> operation.
> kernel: [    3.631987] CIFS VFS: cifs_mount failed w/return code = -101
> kernel: [    3.631999] CIFS VFS: cifs_mount failed w/return code = -101
> systemd[1]: root-tv-i580mt.mount: Mount process exited, code=exited 
> status=32
> kernel: [    3.633183] CIFS VFS: Error connecting to socket. Aborting 
> operation.
> kernel: [    3.633275] CIFS VFS: Error connecting to socket. Aborting 
> operation.
> kernel: [    3.633311] CIFS VFS: cifs_mount failed w/return code = -101
> kernel: [    3.633866] CIFS VFS: cifs_mount failed w/return code = -101
> kernel: [    3.634036] CIFS VFS: cifs_mount failed w/return code = -101
> systemd[1]: Failed to mount /root/tv/i580mt.
> systemd[1]: Dependency failed for Remote File Systems.
> systemd[1]: remote-fs.target: Job remote-fs.target/start failed with
> result 'dependency'.
> systemd[1]: root-tv-i580mt.mount: Unit entered failed state.

The problem is that systemd does not wait for DHCP addresses to be 
obtained.
Being new to systemd I could not succeed in finding the right parameters 
and dependencies in order to have the mounts wait till we have an IP 
address.
I tried remote-fs.target, network-online.target, and other hacks with no 
success.
This machine being keyboardless, I did not dare migrate to 
systemd/networkd in order to try systemd-networkd-wait-online.
As a workaround, I ended up setting the shares to automount, which works 
fine, but I would prefer to have them mounted at the very beginning.....

Any idea?

-- 
Guy

[toc] | [prev] | [next] | [standalone]


#182408

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2017-06-20 14:20 +0200
Message-ID<tUqiu-8w4-19@gated-at.bofh.it>
In reply to#182396
On Tue, Jun 20, 2017 at 10:00:14AM +0200, guy@posteurs.com wrote:
> The problem is that systemd does not wait for DHCP addresses to be 
> obtained.
> Being new to systemd I could not succeed in finding the right parameters 
> and dependencies in order to have the mounts wait till we have an IP 
> address.
> I tried remote-fs.target, network-online.target, and other hacks with no 
> success.

I can't help with CIFS mounts from fstab specifically, but I did learn
a thing or two about network-online.target in Debian due to a similar
issue with nfs-kernel-server.

network-online.target only cares about interfaces that are listed as
"auto" in /etc/network/interfaces.  Not allow-hotplug.  It has to be
auto.

Once you mark your interfaces as auto instead of allow-hotplug, then you
can create a dependency on network-online.target and have it actually
work.  I did so for the nfs-kernel-server package, which uses a systemd
service named nfs-server with an alias of nfs-kernel-server... and yes,
it took me a while to figure *that* mess out too.  Lesson #2: never try
to create a drop-in override for an *alias* name of a service.  You must
determine the actual non-alias name first.

$ systemctl status nfs-server
* nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor prese
  Drop-In: /etc/systemd/system/nfs-server.service.d
           `-waitlonger.conf
   Active: active (exited) since Mon 2017-06-19 08:22:36 EDT; 23h ago
  Process: 522 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/
  Process: 519 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS
 Main PID: 522 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/nfs-server.service

$ cat /etc/systemd/system/nfs-server.service.d/waitlonger.conf 
[Unit]
Wants= network-online.target
After= network-online.target

See <https://bugs.debian.org/860264> for more details.

[toc] | [prev] | [next] | [standalone]


#182425

FromGuy Marcenac <guy@posteurs.com>
Date2017-06-20 18:30 +0200
Message-ID<tUucq-2wu-29@gated-at.bofh.it>
In reply to#182408
Wow Greg, youre awesome !


Le 20/06/2017 à 14:10, Greg Wooledge a écrit :
 > On Tue, Jun 20, 2017 at 10:00:14AM +0200, guy@posteurs.com wrote:
 >> The problem is that systemd does not wait for DHCP addresses to be
 >> obtained.
 >> Being new to systemd I could not succeed in finding the right parameters
 >> and dependencies in order to have the mounts wait till we have an IP
 >> address.
 >> I tried remote-fs.target, network-online.target, and other hacks with no
 >> success.
 >
 > I can't help with CIFS mounts from fstab specifically, but I did learn
 > a thing or two about network-online.target in Debian due to a similar
 > issue with nfs-kernel-server.
 >
 > network-online.target only cares about interfaces that are listed as
 > "auto" in /etc/network/interfaces.  Not allow-hotplug.  It has to be
 > auto.
I would never have guessed this allow-hotplug thing.
Thank you very much.

 > Once you mark your interfaces as auto instead of allow-hotplug, then you
 > can create a dependency on network-online.target and have it actually
 > work.  I did so for the nfs-kernel-server package, which uses a systemd
 > service named nfs-server with an alias of nfs-kernel-server... and yes,
 > it took me a while to figure *that* mess out too.  Lesson #2: never try
 > to create a drop-in override for an *alias* name of a service.  You must
 > determine the actual non-alias name first.
 >
Hope I will remember. From now on, it looks like we will have to become 
familiar with systemd.

 > See <https://bugs.debian.org/860264> for more details.
 >
Dont you feel a bit alone there?

And sorry for the direct post to your mb,

-- 
guy

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web