[SOLVED] Mount shares on start
#1
Hi there,

Just converted to Ubuntu from Windows and going through some growing pains.

I have my music and video on a Synology NAS. I created NFS shares in Ubuntu which worked fine. However, when I restart the machine in the morning the NFS folders aren't showing anything - they're just empty shells. My NAS does go into sleep mode overnight so what happens with my Fire TV is that it initially says no connection, but I can hear my NAS wake up, and on the second go it works. But on Ubuntu I get nothing, I have to go through mounting the shares again.

So, I've been trying to learn how to mount shares on start up, and unsurprisingly there are millions of suggestions on google of things to type into Terminal, so I thought it best to try the official help route and got directed to this:
https://help.ubuntu.com/community/Settin...at_startup

Now, I'm a bit baffled, what the hell is solarisbox1.com? Is it supposed to be an example of what I'm supposed to type? I've been told to add lines to fstab, but I tried to add these lines and it didn't work: I had created the files /mnt/nfs/music and /mnt/nfs/vido before starting and these were showing my NAS files but are now empty unless I re-run the mount command each time at start-up.

Code:
192.168.1.148:/volume1/music /mnt/nfs/music nfs auto,noatime,nolock,bg,nfsvers=4,intr,tcp,actimeo=1800 0 0
192.168.1.148:/volume1/video /mnt/nfs/video nfs auto,noatime,nolock,bg,nfsvers=4,sec=krb5p,intr,tcp,actimeo=1800 0 0

Any advice greatly appreciated.
Reply
#2
Firstly, I assume you have the nfs-common package installed on the Kodi machine and that the code you show is in /etc/fstab on that machine - is that right?

If so, you may have some issue with one or more of those options you have. I would start simple with just this first in /etc/fstab:

192.168.1.148:/volume1/music /mnt/nfs/music nfs auto 0 0

Then run sudo mount -av and see what happens.

Then apply the other options one by one to see what happens each time.
______________________

Acer Revo 1600 | SpeedLink SL-6399 | Kodibuntu :nerd:
Reply
#3
Thanks gilgongo, yes I have installed the nfs-common package. What I think I may have done wrong is putting the shares in the /mnt folder. I've now recreated them in the /home folder, as I read in one post that you need to have rights that you have in /home but not in /mnt. Unfortunately, I have to wait until no-one is using the NAS and it goes to sleep before finding out if it works or not, which basically means overnight. If not I'll start to try changing thing in /etc/fstab as you suggest.

Could I also ask you though, is it normal that when adding files to the Kodi library through an nfs share on ubuntu that you would choose them through the Home or Root folders rather than the NFS Share option when using the browse function. The NFS Share option just shows the ip address of my NAS, whereas the Home and Root options show the actual folders.
Reply
#4
The NFS option in Kodi should show you the IP Address of any NFS servers, and then if you click on an address, it should show you the NFS exports for that server.
Learning Linux the hard way !!
Reply
#5
Moving the client shares on my laptop from /mnt to /home actually seems to have worked, as this morning when I started up Ubuntu before logging in I could hear the Syno starting up. So, all good for now.
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] Mount shares on start0