systemd connection to an activated server

I have two Raspberry Pi 4s, the Client is Pi4 and the Server is Pi2. Both are running Manjaro Xfce. I'm using systemd to manage the attachment of Pi4 to Pi2's disk and it works well. It connects when the Pi2 is up and doesn't hang during boot when the Pi2 is down.

Here's the problem: If Pi2 is down and I boot Pi4, the boot is not a problem. But, if I then boot Pi2 (the server) and try to use systemctl on Pi4 to connect to Pi2 it doesn't work. I've tried sudo systemctl start srv-samba.mount and sudo systemctl restart srv-samba.mount and neither work.

Here's my srv-samba.mount file:
1 [Unit]
2 Description=Access Pi2s Share
3 After=network.target
4
5 [Mount]
6 What=//192.168.1.30/pi2
7 Where=/srv/samba
8 Type=cifs
9 Options=_netdev,iocharset=utf8,rw,credentials=/home/larry/.smb,workgroup=WORKGROUP,cache=loose,uid=larry,gid=larry
10 TimeoutSec=30
11
12 [Install]
13 WantedBy=multi-user.target
14

Any thoughts? Comments?

What's the output of:

smbclient --list=* --no-pass --debuglevel=2

on the client?

Hmmm, nvm. I just repeated the experiment and it connected with no problem. I have no clue what I did before.

[larry@Pi4 ~]$ sudo systemctl status srv-samba.mount
[sudo] password for larry:
ā— srv-samba.mount - Access Pi2s Share
Loaded: loaded (/etc/systemd/system/srv-samba.mount; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-04-29 15:08:32 CDT; 5min ago
Where: /srv/samba
What: //192.168.1.30/pi2
Apr 29 15:07:33 Pi4 systemd[1]: Mounting Access Pi2s Share...
Apr 29 15:08:32 Pi4 mount[434]: mount error(113): could not connect to 192.168.1.30Unable to find suitable address.
Apr 29 15:08:32 Pi4 systemd[1]: srv-samba.mount: Mount process exited, code=exited, status=32/n/a
Apr 29 15:08:32 Pi4 systemd[1]: srv-samba.mount: Failed with result 'exit-code'.
Apr 29 15:08:32 Pi4 systemd[1]: Failed to mount Access Pi2s Share.

[larry@Pi4 ~]$ sudo systemctl start srv-samba.mount

[larry@Pi4 ~]$ sudo systemctl status srv-samba.mount
ā— srv-samba.mount - Access Pi2s Share
Loaded: loaded (/etc/systemd/system/srv-samba.mount; enabled; vendor preset: disabled)
Active: active (mounted) since Wed 2020-04-29 15:14:45 CDT; 7s ago
Where: /srv/samba
What: //192.168.1.30/pi2
Tasks: 0 (limit: 4265)
Memory: 376.0K
CGroup: /system.slice/srv-samba.mount
Apr 29 15:14:45 Pi4 systemd[1]: Mounting Access Pi2s Share...
Apr 29 15:14:45 Pi4 systemd[1]: Mounted Access Pi2s Share.

I can access Pi2's share now from Pi4. No clue what I did before to screw it up.

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.

Forum kindly sponsored by