Thanks a lot! I didn’t know about the IP range.
But shouldn’t “rw” option always be present? To make sure you can read and write on the device?
Thanks a lot! I didn’t know about the IP range.
If it’s just for media, ro should be enough and is the safest. Since there’s no authentication, using rw needs a bit of careful thought.
Might need “wait for network” to be ticked
In a “normal” scenario, I’d say no. This was an issue for me and keeping the line simple with exactly the above commands fixed the issue of the share not being mounted early enough. No “wait for network” was needed anymore.
As “wait for network” can have other effects, too, that are not very convenient, I’d try to always avoid it. And I’d definitely not want to recommend it to all users setting up NFS FSTAB…
I noticed you use /mnt/ instead of /media/
I understand automounted drives are in /media/ and permanently connected drives should be mounted manually via /etc/fstab in /mnt/.
What happens when I mount my USB drive via fstab in /mnt/, but select “remove safely” in Kodi? And replug the drive later? Should I add it to fstab again? Or will I no longer have the option in Kodi to remove safely if I mount via fstab?
This is about remote mounts which should be present or, let’s say, available all the time. These should be mounted to /mnt/. Removable drives like a USB drive are and should be automounted to /media/.
Why would you want to mount a USB drive manually to /mnt/ via fstab? I’d guess that fstab mounted removable drives wouldn’t show up as safely removable. But it’s just a guess, somebody more experienced has to comment on this.
Well the USB drive is connected permanently but I might remove it once or twice a year.
But strangely, mounting NFS doesn’t work anymore (I’m doing a new setup).
On a clean OSMC RPi3 with Kodi disabled (headless) I have this in my /etc/fstab:
192.168.1.1:/media/USBDRIVE /mnt/USBDRIVE nfs noauto,x-systemd.automount 0 0
And on the Vero 4K (with IP 192.168.1.1) with a usb drive attached, nfs server is installed, this is /etc/exports:
Strangely, this is the output on the client (RPi)
Ah, I see… This is a completely different scenario. It’s about sharing a USB drive connected to the Vero 4k to a RPi via NFS FSTAB?
BTW I notice when the Vero4K boots, it is unable to start the NFS server, because /media/USBDRIVE is not mounted yet automatically.
How can I make sure it waits for the USB drive to be mounted?
Have you enabled “wait for network” under MyOSMC/network?
No, I will try that one.
But honestly, this is out of my league… Does anybody like @grahamh or @fzinken have any ideas?
It’s a setup I haven’t tried myself yet and technically the NFS server doesn’t need to wait for the network to be ready, but for the mount process of USB devices… How could that be forced to happen?
So this is a matter of timing in the Vero. The NFS server won’t start if the mountpoint doesn’t exist. That’s why I mount my shared drive in /mnt. If you mkdir /mnt/USBDRIVE on the vero then /mnt/USBDRIVE is always there and NFS server will share it even it’s a bare directory. Then when it gets mounted (via fstab on the vero) you are good to go.
OK, this is a good argument to mount the drive manually via fstab instead of relying on automount.
But then I will not be able to “remove safely” via Kodi File Manager anymore, right?
Probably not. But you said you only want to do his occasionally so just power down.
Edit: You can ‘remove safely’ if you add
users as an option in fstab and make sure no-one is connected to the drive. But you will still have to reboot to mount it again.
I also need to be able to access the drive via SMB. Only automounted drives are added to SMB share automatically. I can imagine this is going to lead to issues as well (I am really not a regular Linux user).
I really prefer automounting, unless manually mounting would also have performance advantages (with NTFS specifically).
So why are you bothering with NFS? Just let OSMC’s automount mount it on server (vero). Then from other devices look for the share using SMB.
Because I need both. NFS for the connection between OSMC devices, SMB for file access from Windows
Your setup is becoming more and more unusual
Not really. It is actually quite simple:
- I want 1 device running Flexget, Transmission, SyncThing, Spotify-Connect, Kodi.
- Flexget and Transmission should run via OpenVPN. Others should not since that will lead to playback issues for my legal local stream add-ons and performance issues with stuff like SyncThing.
None of the solutions provided in this topic have worked successfully yet to run specific apps via VPN. That’s why I use 2 devices for now:
In December I bought a Vero 4K. I now use my RPi3 purely for Flexget+Transmission, running OpenVPN.
My Vero 4K is my main playback device. I also use UPNP Library to share my library on the Vero 4K to RPi2’s in other rooms. Therefore, the USB NTFS drive is connected to the Vero 4K.
To give the RPi3 “download box” speedy access to the Usbdrive, since that’s my only storage, I use NFS.
Furthermore, I have Windows laptops for private use or for business and Android phones. Each one should be able to access the USB drive. It contains my photo backup and some documents. So Samba is active on the Vero.
Everything works smoothly. I just have to manually start NFS-server (I could probably add it to MyOSMC) if I ever reboot the Vero.
Ok, I see…
It doesn’t sound like a very “speedy” solution at all as this all goes through a fast ethernet port of the Vero 4k, but as long as it serves your needs
As @grahamh suggested before, why not try using SMB here and see, if there are any performance issues at all. As long as everything’s working fine, why make it complicated?