Linux NFS and default Share Issues
#1
Howdy!

New to HTPC and XBMC. Bought some hardware this weekend and built my first one today. For the most part its up and running with 2 USB drives connected. One with TV shows, One with Movies.

I just have a few issues to iron out.....well that and connecting up my Harmony 650 remote. But that looks like another beast altogether.

This is to concentrate on a couple issues:

Issue 1:
The default shares. Why was "TV Shows" set with a space/2words? Most know Linux doesn't play well with spaces. Can this be renamed?

Issue 2:
I'm having a hell of a time with NFS in general.

Installed nfs common and the nfs server.
Created /home/urlryn/exports/TVShows and /home/urlryn/exports/Movies
ran: mount --bind /media/drive1/Movies /home/urlryn/exports/Movies
ran: mount --bind /media/drive2/TV /home/urlryn/exports/TVShows

Edit /etc/exports to include
/home/urlryn/export/Movies *(rw,async,no_subtree_check,insecure,nohide)
/home/urlryn/export/TVShows *(rw,async,no_subtree_check,insecure,nohide)

Edit /etc/fstab to include
/media/drive1/Movies /home/urlryn/export/Movies none bind 0 0
/media/drive2/TV /home/urlryn/export/TVShows none bind 0 0

Mounts executed with no errors.
Unable to browse/map from Windows machine (nfs client is installed) to the xmbc box. Though I have a feeling this maybe due to the default shares? Especially Movies. But why doesn't TVShows ever appear in networking?
Rebooting XBMC server resulted in mounting errors where ya press S to skip or M for manual for both entries


Decided instead of creating new shares...just use the ones already there. Hence that lead up to the TV Show Share question above.

ran: mount --bind /media/drive1/Movies /home/urlryn/Movies
ran: mount --bind /media/drive2/TV "/home/urlryn/TV Shows"

Edit /etc/exports to include
/home/urlryn/Movies *(rw,async,no_subtree_check,insecure,nohide)
"/home/urlryn/TV Shows" *(rw,async,no_subtree_check,insecure,nohide)

Edit /etc/fstab to include
/media/drive1/Movies /home/urlryn/Movies none bind 0 0
/media/drive2/TV "/home/urlryn/TV Shows" none bind 0 0

Mount executes with no problems.
I'm able to browse and see my files under Movies and TV Shows....until reboot
then again i get the same errors as before for both entries....

How can i get the bind to stay persistent after a reboot?

Thanks
Urlryn
Reply
#2
Instead of mounting the individual directories in /media just mount the entire drive and then share the required directories with NFS.

Something like

Code:
UUID=344217e1-384b-483d-b31f-9fd44df1db87 /media/sdc1    ext4    defaults    0 0

And then share with
Code:
/media/sdc1/Movies    192.168.1.1/24(rw,all_squash,insecure,no_subtree_check)
Learning Linux the hard way !!
Reply
#3
Thanks Black_eagle!

Originally I had a TV and Movies folder on each drive...I just recently swapped them around to their own individual drive.
So was pretty much stuck on sharing out the 2 folders and didn't even dawn on me to just share out the drives!

I'll give that a go and see!
Urlryn
Reply
#4
You don't need to share the entire drive (although you can of course). If you look at my example, the drive is mounted in /media as sdc1. I then share the Movie directory from that drive in my /etc/exports file.

Although I could have created other mount points and then bound the Movie directory to that, I didn't see the point. If you are using UUID's for your USB drives, fstab should mount them automatically if they are present, and skip them if not.
Learning Linux the hard way !!
Reply
#5
yeah why do you do the intermediate step with bind mounting it? Why not just exporting the original mount points? Also spaces are no problems nowadays (all for all not on linux - they never were an issue on linux at all).
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
Thanks guys,

To be honest....not sure why i was making this so complicated!

Definitely appreciate the prodding in the right direction! Smile

Urlryn
Reply
#7
One other question.

I have a external USB anime drive....its currently connected up to my windows system and formatted as NTFS.

I connected it to the XBMC box and it shows up as
Code:
/dev/sdb1: Label="SAMSUNG" UUID="xxxxx" TYPE="ntfs"
would mounting this work the same way as above?

/etc/exports
Code:
/dev/sdb1 192.168.1.1/24(rw,all_squash,insecure,no_subtree_check)

/etc/fstab
Code:
UUID=xxxxxxxxx  /media/SAMSUNG NTFS defaults 0 0

I deal with more windows networking than Linux...so let me know if i'm way off base!

Urlryn
Reply
#8
Yeah, that looks right for mounting. Just be aware if you use that exact line, that Linux is CaSe SenseTive unlike Windows, so you will always have to refer to the drive as SAMSUNG.

Don't share it as /sdb1 though, because if you have other drives mounted, it might not BE /sdb1

Do the export as /media/SAMSUNG so it doesn't matter which drive letter its actually mounted to.
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
NFS and default Share Issues0