[SOLVED] Possible to export some NFS shares?

I’d go ahead and try it but I’ve just spent the last 2 days getting Deluge & Flexget working and I’m worried about blowing it all up.

I have a USB hard drive plugged and I’d like to export some directories with NFS. Anyone having luck doing this? All the searching I’ve done has only shown people mounting shares, not exporting.

I have done it on my cousins Pi just install nfs-kernel-server and setup /etc/exports like any Linux system.

Thanks, that’s just what I needed. I didn’t know what package was required.

Update: Works great. No issues at all.

Do you mind sharing your method? I’ve been trying to get working but so far only home directories are able to be seen when shared, any other folder, including media, cannot be listed when added as a source in other Kodi (in windows).

Can you go into more detail about what you’re trying to do, please?

I want to do the same thing you mentioned in your post. Share a USB drive (flash or HDD) with NFS server, to share my videos with another Pi.

I thought it was going to be as easy as you said, but this is my first time making changes in Linux, newbie here. My question is that if the media mounts can be shared? If not, how did you unmounted the USB drive to mount it in another location?

Edit: Unmount solved, in the other post. Still I have to try if mounting in another location let the NFS do its thing.

Create directories in /mnt/ to mount your drive. (Everything in /media/ is temporary so let’s stay away from that.)

Edit your /etc/fstab to mount your HDD/flash drive to /mnt/name.of.mountpoint. Test this configuration with sudo mount -a to see if it works before rebooting so you don’t have to mess with recovery console in the event that you got something wrong in fstab.

sudo apt-get install nfs-kernel-server to get nfs server installed.

Edit /etc/exports to export nfs shares. Here’s mine as an example:

osmc@osmc:~$ cat /etc/exports 
/mnt/Main 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
/mnt/Main/Kids 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
/mnt/Main/New_TV 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
/mnt/Main/New_Movies 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
/mnt/Main/Cool_Vids 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
/mnt/Main/Music 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
/mnt/Main/Torrents 192.168.1.0/24(rw,sync,no_subtree_check,insecure)

After that, just reboot. You can do showmount -e to see what nfs shares are active.

1 Like