Page 1 of 1

Samba shares on RPi mounted on Ubuntu - how to resume after fail

Posted: Mon Jun 03, 2019 5:04 pm
by Bosse_B
I have a couple of RPi units (RPi2B and RPi3B+) which have USB connected hard drives attached.
These are automatically mounted on startup via /etc/fstab
On both I have setup a samba share on the root of the USB drive with rw permissions.

On an Ubuntu 18 server I mount these shares so I can copy over large files via the network easily.
These mounts are also defined in /etc/fstab and they are mounted when the Ubuntu server starts up.

Now I have a hen-and-egg problem:
If one or both of the RPi boxes are not present on the network when the Ubuntu server starts up then the fstab mount fails and the share is inactive...

Is there any way except by restarting the Ubuntu server to establish the mount when the RPi is again running?
I don't want to restart because the Ubuntu machine is used for other purposes too, like being a SVN server...

Re: Samba shares on RPi mounted on Ubuntu - how to resume after fail

Posted: Mon Jun 03, 2019 7:01 pm
by thagrol
The quickest way would be to open a terminal windows and run

Code: Select all

sudo mount -a
That'll mount everything in fstab that isn't already mounted and doesn't have the noauto mount option set.

To mount a single share that's in fstab try

Code: Select all

sudo mount /path/to/mount_point

Re: Samba shares on RPi mounted on Ubuntu - how to resume after fail

Posted: Mon Jun 03, 2019 7:23 pm
by Bosse_B
Thanks, the command

Code: Select all

sudo mount -a

looks like what I need!