You are not logged in.

#1 2021-12-13 10:57:04

krosis
Member
Registered: 2020-07-12
Posts: 6

cifs_mount returning error code -112

Hello everyone,

I recently set up a NAS system with a smb share. It works fine, and I'm able to connect to it just fine. I have set it to automount on start up

/etc/fstab

#standard mounts
.
.
.

//XXX.XXX.XX.XX/folder  /netdrive       cifs    uid=0,credentials=/home/USER/.smb,iocharset=utf8,vers=3.0,noperm 0 0

And it works just fine, except it only works once. When it does work, and I restart it. It doesn't mount properly, and doesn't mount properly on any startup until I do a hard reset on my PC (I turn it off and unplug it and replug it), and then it works properly again, one time. I was able to find the error it was spitting out

sudo dmesg | grep -i mount 

.
.
.

[   10.051778] CIFS: Attempting to mount \\XXX.XXX.XX.XX\folder
[   15.184971] CIFS: VFS: cifs_mount failed w/return code = -112

I am not 100% sure, but if it were a standard linux error code it would be EHOSTDOWN "Host is down".

I do have multiple errors that are solved by a hard reset, mainly bluetooth not working, and the xfce poweroff button not working so I'd have to do shutdown now to get the computer to turn off,  so there might be an overlying issue here. This is just the first time I was actually able to get an error message from something. I double checked my bios settings and secure boot and fast boot are both disabled. This is honestly such a weird issue that I don't know how to begin to attack it. I'm even baffled on what exactly to look up to find out what is going wrong. Does anything have an idea on what might be going on?

I don't know exactly what information will be relevant but I will be happy to supply them if needed.

edit: just realized this may be more suited for the System Administration board.

Last edited by krosis (2021-12-13 11:01:03)

Offline

#2 2021-12-13 12:24:12

seth
Member
Registered: 2012-09-03
Posts: 58,745

Re: cifs_mount returning error code -112

I do have multiple errors that are solved by a hard reset, mainly bluetooth not working, and the xfce poweroff button not working so I'd have to do shutdown now to get the computer to turn off,  so there might be an overlying issue here.

Sanity check:

hostnamectl
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

When it does work, and I restart it. It doesn't mount properly

Restart *what*? The share provider? The cifs client? The mount (do you umount it?)
Can you still ping the remote share after "restart it"?

Offline

#3 2021-12-13 13:34:23

krosis
Member
Registered: 2020-07-12
Posts: 6

Re: cifs_mount returning error code -112

So sorry I can see how that can be confusing. My share provider is pretty much running 24/7 on my home server so I guess I forgot it can be rebooted and stuff.

When I mean restart, I mean specific restarting the desktop I am typing this on (running Arch Linux).  I can still ping it from my desktop after a reboot, and I can even mount it manually with mount -t cifs. It just fails to mount at start up with my fstab after the first reboot.

For Sanity Check

$ hostnamectl
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
 Static hostname: arch
       Icon name: computer-desktop
         Chassis: desktop
      Machine ID: 0409c9a2dede40d29fc2cfcf63143d01
         Boot ID: 39412637005e4613a908ae17a909d507
Operating System: Arch Linux                      
          Kernel: Linux 5.15.7-arch1-1
    Architecture: x86-64
 Hardware Vendor: To Be Filled By O.E.M.
  Hardware Model: To Be Filled By O.E.M.
bluetooth.service                        | bluetooth.target.wants
dbus-org.bluez.service                   | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
gcr-ssh-agent.socket                     | sockets.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
libvirtd-ro.socket                       | sockets.target.wants
libvirtd.service                         | multi-user.target.wants
libvirtd.socket                          | sockets.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
sshd.service                             | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants
tailscaled.service                       | multi-user.target.wants
virtlockd.socket                         | sockets.target.wants
virtlogd.socket                          | sockets.target.wants

I did it both when a the drive successfully mounted and when it failed and it's the same output each.

Offline

#4 2021-12-13 14:17:42

seth
Member
Registered: 2012-09-03
Posts: 58,745

Re: cifs_mount returning error code -112

I wanted to see whether there's an obvious problem w/ the network/hostname resolution. But isn't.

I can even mount it manually with mount -t cifs. It just fails to mount at start up with my fstab after the first reboot.

"sudo journalctl -b" after such boot, please.
I'd consider https://wiki.archlinux.org/title/Fstab# … th_systemd to delay the mount - so fstab won't have to wait for the network (or delay the boot until timeout)

Offline

#5 2021-12-13 23:35:52

krosis
Member
Registered: 2020-07-12
Posts: 6

Re: cifs_mount returning error code -112

http://sprunge.us/bGJxI4 is the info you asked for,

and I will look into that.

Offline

#6 2021-12-14 07:29:04

seth
Member
Registered: 2012-09-03
Posts: 58,745

Re: cifs_mount returning error code -112

The cifs mount is attempted as soon as NM has a connection on wlp4s0 - does access to the kro.do share rely on the VPN?

Offline

Board footer

Powered by FluxBB