LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2014, 01:21 AM   #1
Rsqdivr
LQ Newbie
 
Registered: Mar 2014
Posts: 5

Rep: Reputation: Disabled
NFS recursive mount/share


I have a Nas4free server that I was going to host my media files to my ubuntu htpc. I have a "movies" directory that contains each of my bluray rips in subdirectories. I can share the media folder using samba but have been seeing that NFS is the "Linux Way" of sharing. The problem I'm having is that I can't see any way to setup the share and have it apply to all subdirectories. Surely I'm not supposed to share/mount each individual movie folder, right?
 
Old 03-03-2014, 02:59 AM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
1. what are you trying to share the media files to?
2. if MS world then stick 100% with SAMBA, do not bother with NFS
3. if Linux, then forget SAMBA and go 100% NFS
4. if a cross of Linus and OSx, then again go 100% NFS
4a. keeping in mind that when crossing Linux and OSx you will need to use both NFSv3 and NFSv4 and the insecure options.

Here is my /etc/exports on my CentOS6.x server for my Linux + OSx LAN

Code:
]$ cat /etc/exports 
#
#	/etc/exports

#	NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)

#	NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
/exports/NFS_TV_Shows *(rw,insecure,no_subtree_check,fsid=3020)
NOTE the insecure option for both NFSv3 and NFSv4. that is due to OSx not functioning properly with NFS shares in linux.
 
Old 03-03-2014, 12:43 PM   #3
Rsqdivr
LQ Newbie
 
Registered: Mar 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
thanks for the reply.

I'm sharing my movie rips with my htpc (Linux) and OSx devices. I don't plan on any MS users.

My movies are all in individual folders within the "movies" directory. How can I share the Movies directory and all subdirectories/folders using NFS without manually sharing each one, and separately mounting each folder? I haven't been able to locate a way.

Thanks.
 
Old 03-03-2014, 12:47 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i always thought that nfs would show subdirectories by default (what dows your /etc/exports look like).

i actually prefer sshfs for file-sharing.
 
Old 03-03-2014, 03:07 PM   #5
Rsqdivr
LQ Newbie
 
Registered: Mar 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
trying to figure out how to query that from Nas4free. showmount command only lists:
/mnt/zpool1/HTPC_media

this is the media folder which has two subdirectories (Movies, and TV). After I mount this share on my ubuntu htpc box, I can see those two subdirectories but can't open them. The result is: " bash: cd: Movies: Permission denied".
 
Old 03-03-2014, 03:11 PM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Rsqdivr View Post
thanks for the reply.

I'm sharing my movie rips with my htpc (Linux) and OSx devices. I don't plan on any MS users.

My movies are all in individual folders within the "movies" directory. How can I share the Movies directory and all subdirectories/folders using NFS without manually sharing each one, and separately mounting each folder? I haven't been able to locate a way.

Thanks.
look at my exports, you will want to set your exports up similar to mine.

you will need both the NFSv3 and v4 due to having OSx in the mix.

Note for my NFSv4 I only have the single line for the share /exports. that is a directory that all of my other shares mount, but with NFSv4 this will allow for anyone in my LAN to connect to that specific share and not have to worry about the other 2 share locations.

my OSx computers/devices have to use the NFSv3 and have to mount both the /exports/centos/public and /exports/NFS_TV_Shows in order to gain access to all of my shares.

Schneidz, NFS will share subdirectories if it is v4, but not in v3. from what I understand.

The issues with sshfs is the slower access speeds for streaming media. for local file shares NFS is the best option for the OP.
 
Old 03-03-2014, 03:36 PM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i use sshfs with my xbmc machine and it is adequate. is ssh encryption that much heavier than wep/wpa/wpa2 ?
 
Old 03-03-2014, 06:27 PM   #8
Rsqdivr
LQ Newbie
 
Registered: Mar 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
mine shows:

$ cat /etc/exports
/mnt/zpool_1/HTPC_media -alldirs

lleb, can I ask what server OS you use? I'm trying to see how to determine my nfs version. nfsstat returns no version number. I'm not sure how easy it is to configure inside nas4free so I may need to consider just doing an ubuntu server or something like that. I like the zfs on nas4free and small os size.
 
Old 03-03-2014, 06:42 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Just for sake of clarity. You can share same directory (with all subdirectories) over CIFS, NFS, FTP, HTTP, AFP, whatnot, simultaneously.
 
Old 03-04-2014, 06:52 AM   #10
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Emerson View Post
Just for sake of clarity. You can share same directory (with all subdirectories) over CIFS, NFS, FTP, HTTP, AFP, whatnot, simultaneously.
yes, but you will require the appropriate service for each.

CIFS is NOT, i repeat, NOT a Linux share system, nor is AFP, those are proprietary file systems for their respective OSs, MS, OSx in that order.

Why would you bother setting up a Samba share to a MS Windows system to stream media when the OP has zero Windows systems in his network? That was discussed earlier in the thread.

Also Linux will not have a HFS file system native to its file system as that is what Apple uses, AFP is NOT a file system it is the "Apple Fileshare Protocol" and is NOT used by Linux.

FTP, HTTP are again services and NOT file systems that are shared. One is run by an FTP service the other, in most cases in Linux is run by Apache web server. None of those have anything to do with the OPs question.

Yes ssh encryption is heavier then Wep/Wpa encryption. While i have used sshfs from time to time, it is never ideal for streaming LOCAL media. For accessing files while you are away from the local source by all means if you have not configured a VPN to your system, using sshfs is ideal and a very good way to setup a cheap road-warrior VPN without the hassle.

Again, use the native tools for the job.

1. Linux to Linux (OSx) file sharing use NFS
2. Linux to MS file sharing use SAMBA

Its really that simple.

as for the question of my OS, please read carefully my posts from above:

Quote:
Here is my /etc/exports on my CentOS6.x server for my Linux + OSx LAN
I thought that was rather clear.
 
Old 03-04-2014, 12:25 PM   #11
Rsqdivr
LQ Newbie
 
Registered: Mar 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
thanks for the detailed explanation. Sorry, I don't know what CentOS6 is so I didn't recognize it. Googled it. Now I know. :-D Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS Client Unable to Mount the NFS Share devUnix Linux - Server 8 09-12-2019 10:53 AM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
How can I mount a NFS share that have a SMB share mounted? perezyanez Linux - Networking 2 09-26-2008 09:03 AM
Can't mount nfs share from fstab but can mount it manually - help Mountain Linux - Networking 1 03-30-2008 08:34 PM
Cannot Mount NFS Share Ingla Linux - Server 3 08-02-2007 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration