LinuxQuestions.org
Review your favorite Linux distribution.
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 01-08-2018, 11:09 AM   #31
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722

Quote:
Originally Posted by road hazard View Post
This one: mount -t nfs server:/mnt/md0/data /mnt/clientmountpoint

It's just weird that if I share /mnt/md0, that works. But sharing /mnt/md0/data, /mnt/md0/test, /mnt/md0/Pictures, /mnt/md0/incoming ...... all those fail. Wonder if I should open up a bug report somewhere. But with who? Is this an MDADM problem? NFS-server? NFS client?

Do you (or anyone reading this thread) have an MDADM array setup to test things on your side? Maybe this is a Mint specific failure? (Or, user error. )
Did you try the first version?
Code:
mount -t nfs server:/data /mnt/clientmountpoint
 
Old 01-08-2018, 03:34 PM   #32
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Did you try the first version?
Code:
mount -t nfs server:/data /mnt/clientmountpoint
No go. I really think the problem is this error at boot on the server: server-pc exportfs[1589]: exportfs: Failed to stat /mnt/md0/data/: No such file or directory

If the server can't find that folder, it can't share it via NFS. I think we need to zero in on that error. I'm going to try Rickkkk's suggestion of editing my mdadm.conf file.
 
Old 01-08-2018, 03:36 PM   #33
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
:-) .. I hear ya and completely understand.

In answer to your question in a subsequent post, my own server, to which I was referring, is set up with mdadm (RAID5) with LVM on top. In my particular case, I have shared an entire subdirectory tree under the /home directory (i.e.: /home/[shared directory tree]). The way I have set it up is to share the entire [shared directory tree] under /home, as well as each of the next level subdirectories under that, separately. This gives me the granularity I require and I manage permissions for the different users the usual way. Similarly to your case, I also use Samba sharing for Windows clients.

I don't believe your issue has to do with your RAID (mdadm) setup. The fact that you're able to use the directories normally on the server itself and the fact that your Samba sharing works leads me to believe it is more of an nfs-specific issue or a permissions issue.

Let us know when you've had a chance to experiment with my previous suggestions.

Cheers !
So I was thinking more about your suggestion of changing the mdadm.conf file but....since I -CAN- share out the entire array, would changing the mdadm.conf file for a single folder on there really make a difference?
 
Old 01-08-2018, 04:16 PM   #34
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Hey road_hazard,

Sorry if I wasn't clear with respect to my observations re: your mdadm.conf file. I don't think you need to edit it - it states itself that it is creating arrays using Debian standards. However, since you are trying to share it via nfs, I think the permissions it is creating by default on the directory and its subdirectories might need to be changed.

It's the execute privileges that have me concerned. If you make sure all levels from /mnt on down have at least "1" in the last position ("everyone" with execute-only permissions), that would eliminate THAT as a possible reason. Listing the contents of a directory is dependent on the user or group having at least execute permission.

The other suggestion concerned the statements in your exports file and the options: try adding "nohide" and "no_subtree_check" and re-exporting.

One last idea I just had concerns the method and options you're using to mount on the client side. Are you using fstab on your Antergos client or are you trying to mount manually via command line or file-manager ? ... The following are the options I use on my linux clients in their fstab files to connect to nfs shares on my server:

Code:
noauto,users,rsize=8192,wsize=8192,timeo=14,_netdev	0	0
Let me know if any of this is still not clear.
 
Old 01-08-2018, 04:42 PM   #35
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
I'd follow more experienced Rickkkk NFS admin

Just wanted to share another idea...
In the server it's possible to bind mount /mnt/md0/data on another mount point
eg:
Code:
mkdir /mnt/data
mount --bind /mnt/md0/data /mnt/data
Then add /mnt/data in /etc/exports

I don't know if that would work
 
Old 01-08-2018, 08:48 PM   #36
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
Hey road_hazard,

Sorry if I wasn't clear with respect to my observations re: your mdadm.conf file. I don't think you need to edit it - it states itself that it is creating arrays using Debian standards. However, since you are trying to share it via nfs, I think the permissions it is creating by default on the directory and its subdirectories might need to be changed.

It's the execute privileges that have me concerned. If you make sure all levels from /mnt on down have at least "1" in the last position ("everyone" with execute-only permissions), that would eliminate THAT as a possible reason. Listing the contents of a directory is dependent on the user or group having at least execute permission.

The other suggestion concerned the statements in your exports file and the options: try adding "nohide" and "no_subtree_check" and re-exporting.

One last idea I just had concerns the method and options you're using to mount on the client side. Are you using fstab on your Antergos client or are you trying to mount manually via command line or file-manager ? ... The following are the options I use on my linux clients in their fstab files to connect to nfs shares on my server:

Code:
noauto,users,rsize=8192,wsize=8192,timeo=14,_netdev	0	0
Let me know if any of this is still not clear.
Ok, that clears things up, thanks! Will do some playing around when I get more free time.

I'm mounting the share via the command line. (Don't want to do anything permanent to I at least get it working.)
 
Old 01-08-2018, 08:51 PM   #37
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
I'd follow more experienced Rickkkk NFS admin

Just wanted to share another idea...
In the server it's possible to bind mount /mnt/md0/data on another mount point
eg:
Code:
mkdir /mnt/data
mount --bind /mnt/md0/data /mnt/data
Then add /mnt/data in /etc/exports

I don't know if that would work
The bind was successful but adding the bound path to my exports file and executing the exportfs command with the appropriate switches and even rebooting the server ended the same............... empty folder when accessed from the client. I'm not sure what else we can try at this point.
 
Old 01-09-2018, 07:50 AM   #38
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Quote:
Originally Posted by road hazard View Post
Ok, that clears things up, thanks! Will do some playing around when I get more free time.

I'm mounting the share via the command line. (Don't want to do anything permanent to I at least get it working.)

OK - let us know how it goes.

Cheers.
 
Old 01-09-2018, 08:52 AM   #39
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Quote:
Originally Posted by road hazard View Post
The bind was successful but adding the bound path to my exports file and executing the exportfs command with the appropriate switches and even rebooting the server ended the same............... empty folder when accessed from the client. I'm not sure what else we can try at this point.
Please don't reboot after exports changes, it's unnecessary, really. The -r switch for exportfs command does all needed actions to refresh the server NFS shares (see exportfs manual)

Regarding the manual, I see that exportfs also reads entries from files in /etc/exports.d/, you have nothing here that could interfere?
 
Old 01-09-2018, 07:29 PM   #40
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Please don't reboot after exports changes, it's unnecessary, really. The -r switch for exportfs command does all needed actions to refresh the server NFS shares (see exportfs manual)

Regarding the manual, I see that exportfs also reads entries from files in /etc/exports.d/, you have nothing here that could interfere?
The reboots were a .."since NOTHING is getting the NFS share working, might as well?!" type of thing. A Hail Mary pass if you will?

Just checked and there is no /etc/exports.d/ folder.
 
Old 01-10-2018, 06:12 PM   #41
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Please don't reboot after exports changes, it's unnecessary, really. The -r switch for exportfs command does all needed actions to refresh the server NFS shares (see exportfs manual)

Regarding the manual, I see that exportfs also reads entries from files in /etc/exports.d/, you have nothing here that could interfere?
Well I got good news and bad news. The good news is, I got it working. The bad news is, I was using Antergos.

I scrounged up a bunch of old hard drives and created a RAID 6 array with mdadm and did everything else the exact. same. way. and it worked perfectly with Antergos. Like, textbook perfect.

My Kodi box and other Linux boxes in the house had zero problems seeing the NFS share that was sitting on /mnt/md0/data on Antergos. I used the same 'export' file, same everything. Only thing I can think of is the version of mdadm in Mint 18.3 (3.3? 3.4?) has some bug regarding NFS shares that 4.0 addresses.

I guess I could TRY updating mdadm in Mint but being a newbie, I'm wondering what would be easier. Moving to Antergos on my Plex server or installing the 4.x version of mdadm on Mint. I have a backup of my array but losing it and having to copy everything back would kind of suck.

I think that all the programs I need are in the Arch repos (or AUR) except for one maybe but no big deal.

Decisions, decisions.
 
Old 01-10-2018, 06:13 PM   #42
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
OK - let us know how it goes.

Cheers.
Check my latest post. I got it working, but I was using Antergos.
 
Old 01-10-2018, 07:14 PM   #43
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Quote:
Originally Posted by road hazard View Post
Check my latest post. I got it working, but I was using Antergos.
Wow .. interesting ... there has to be something different in the resulting Antergos setup besides the fact that it's a different distro.

Have you compared the permissions on your /mnt and all subdirs between the 2 systems (Mint vs Antergos) ?

Great that you now have a working solution, mind you - good job getting there ! I'm not one to discourage you from using Antergos - as you can tell from my profile, Arch is my own system of choice.

Personally, I'm the type that wouldn't sleep well until I knew what the cause of the issue was. But that's me ... Up to you as to whether you want to pursue this, but if you do, I would start with the permissions issue I mentioned earlier.

Cheers - let us know what you decide.
 
Old 01-10-2018, 09:04 PM   #44
road hazard
Member
 
Registered: Nov 2015
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
Wow .. interesting ... there has to be something different in the resulting Antergos setup besides the fact that it's a different distro.

Have you compared the permissions on your /mnt and all subdirs between the 2 systems (Mint vs Antergos) ?

Great that you now have a working solution, mind you - good job getting there ! I'm not one to discourage you from using Antergos - as you can tell from my profile, Arch is my own system of choice.

Personally, I'm the type that wouldn't sleep well until I knew what the cause of the issue was. But that's me ... Up to you as to whether you want to pursue this, but if you do, I would start with the permissions issue I mentioned earlier.

Cheers - let us know what you decide.
I was re-reading one of your earlier messages and you talked about checking permissions and making sure "1" (the number 'one' I assume) is in the last position. See attached screen shot. Is that what you're referring to? (Last position after the drwxrblahblah stuff?)
Attached Thumbnails
Click image for larger version

Name:	permissions 2018-01-10 21-59-57.png
Views:	31
Size:	8.0 KB
ID:	26730  
 
Old 01-11-2018, 08:07 AM   #45
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
*** WARNING - LONG POST ***

Hi road_hazard,

Yes - exactly that. In linux, there are several ways to express permissions - I'll try to summarize (apologies in advance if you already know all this stuff ...) :

- Permissions are structured around 3 entities:
  • those reserved for the "user-owner" of a file or directory
  • those reserved for the members of the "assigned group" of a file or directory
  • those applying to "others"

- There are several common ways to express permissions on a files or directory, your picture shows one of them:
  • The 1st character denotes the nature of the file or directory. If there is nothing (a dash) in that position, it is a file. If there is a "d", it is a directory. There are other identifiers, but those are the 2 most common ones.
  • The next 3 groups of 3 characters each, are the permissions for, in order, user-owner, assigned group, and others. They are always in this order: rwx (for "read", "write" and "execute").
  • At times, there may be an extra "+" character at the end of the whole string. This indicates that on top of the permissions specified by the preceding characters, there are also one or more specific "acl" s (access control list) on the file or directory. I won't get into that here, suffice to say that this is an additional, distinct method of assigning permissions to a file or directory where more granularity is required. If you're interested, the Arch Linux Wiki (as usual), has excellent documentation.
So for example, an entity whose permission string is: drwxr-x--x+ means:
  • The object is a directory
  • The user-owner of the directory has Read, Write and Execute (all) permissions
  • The members of the assigned group have Read and Execute permissions, but not Write permissions
  • Others have Execute permissions, but not Read nor Write.
  • There are one or more acl's on the directory (these can be listed with the command "getfacl")

Another common way of expressing permissions, often used since it is much shorter in length, is by assigning numerical values to each of the permission types (read, write and execute) and expressing the "groups of 3 characters" with a single digit that is the sum of the values of its specific permission types. More specifically:
  • Read permission ("r") is assigned a value of 4 (binary: 100)
  • Write permissionm ("w") is assigned a value of 2 (binary: 010)
  • Execute permission ("x") is assigned a value of 1 (binary: 001)
So to use our same example above:
  • A directory with permission string drwxr-x--x would be expressed as "751" (user-owner: 4+2+1; assigned group 4+0+1; others: 0+0+1)

The assigned values make it so that a particular sum for a given triad can only represent one unique combination. So this is a type of "shorthand" notation, if you will, that is commonly used when discussing permissions.

More specifically with respect to your situation, the part that was concerning me was the possibility that mdadm was assigning 660 permissions (owner: read write but not execute, group: the same, others: no permissions at all) to one or several of your directories. This concerned me because one of the particularities of linux permissions is that execute permission is required to list the contents of a directory. This is why I was suggesting you verify that aspect.

Anyway, I apologize again for the long post - especially if this information wasn't particularly useful to you.

Let us know what you decide to do and feel free should you feel the need for any more assistance.

Cheers !

Last edited by Rickkkk; 01-18-2018 at 09:13 AM.
 
  


Reply

Tags
nfs mount network


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
copying zipped folders with html files inside SiphoMoon Linux - Newbie 1 05-09-2012 07:20 AM
need to copy the obtained output files inside corresponding folders LINUX rastin_nz Programming 3 11-03-2010 06:14 PM
Some folders not showing in NFS share w00ly Linux - Networking 1 09-18-2009 11:27 AM
Placing a SMB share inside an NFS share grittyminder Linux - Networking 0 05-14-2008 03:49 AM
How to unzip files recursively inside folders? jessdog9001 Linux - Software 2 03-22-2006 12:59 PM

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

All times are GMT -5. The time now is 01:26 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration