Bosse_B
Posts: 836
Joined: Thu Jan 30, 2014 9:53 am

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

Mon Jun 03, 2019 5:04 pm

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...
Bo Berglund
Sweden

User avatar
thagrol
Posts: 1981
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

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

Mon Jun 03, 2019 7:01 pm

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
Attempts to contact me outside of thes forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

Bosse_B
Posts: 836
Joined: Thu Jan 30, 2014 9:53 am

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

Mon Jun 03, 2019 7:23 pm

Thanks, the command

Code: Select all

sudo mount -a

looks like what I need!
Bo Berglund
Sweden

Return to “General discussion”