by Lestrad » Tue Aug 31, 2021 6:34 am
Okay, I booted into Linux Mint and set up a share and tested it. Then I cd'd into the share's mount point directory. I waited a while and all seemed to be well, but when I put the PC into sleep mode and then resumed, I got the same errors -- "Host is down" and "No such device".
I looked at the status of the .mount file:
$this->bbcode_second_pass_code('', '[alarm@alarm etc]$ sudo systemctl status mnt-<share>.mount
- mnt-<share>.mount - /mnt/<share>
Loaded: loaded (/etc/fstab; generated)
Active: inactive (dead) since Mon 2021-08-30 17:16:32 CEST; 3min 16s ago
TriggeredBy: - mnt-<share>.automount
Where: /mnt/<share>
What: //xxx.xxx.x.xx/<share>
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
août 30 12:56:00 alarm systemd[1]: Mounting /mnt/<share>...
août 30 12:56:01 alarm systemd[1]: Mounted /mnt/<share>.
août 30 17:16:32 alarm systemd[1]: Unmounting /mnt/<share>...
août 30 17:16:32 alarm systemd[1]: mnt-<share>.mount: Succeeded.
août 30 17:16:32 alarm systemd[1]: Unmounted /mnt/<share>.')
Note that it didn't unmount until 17:16:32 - which is when I issued the ls command. Normally it should automatically unmount after 30 seconds of inactivity. When I'm in some other directory than the share mount and issue ls /mnt/<share>, then wait a couple of minutes, sudo systemctl status mnt-<share>.mount shows:
$this->bbcode_second_pass_code('', 'août 30 18:37:59 alarm systemd[1]: Mounting /mnt/<share>...
août 30 18:38:00 alarm systemd[1]: Mounted /mnt/<share>.
août 30 18:39:00 alarm systemd[1]: Unmounting /mnt/<share>...
août 30 18:39:00 alarm systemd[1]: mnt-<share>.mount: Succeeded.
août 30 18:39:00 alarm systemd[1]: Unmounted /mnt/<share>.')
In other words, the share unmounts as it's supposed to after 30 seconds.
So what seems to happen is that once I'm actually in the mount directory, the share does not auto-unmount. Systemd says it's "unmounting", but in fact the share has become unfindable by the file system, and the "Host is down" message is issued. Meanwhile SMBCLIENT can connect. So it's as if systemd or the kernel or whatever isn't even trying to connect to the host. And the problem does indeed seem to be unrelated to Windows.