LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-06-2018, 11:30 AM   #1
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Rep: Reputation: Disabled
Question Can see my NFS share but not the files/folders inside it


On Linux Mint 18.3, I have a folder shared out via NFS with lots of files/folders in it. The share appears to be setup correctly and I can mount it from my Antergos box but when I go into it from Antergos, it's empty.

I'm sure it's a permission issue of some kind or how I'm sharing it out. Any tips?

In my /etc/exports file on Mint, I have tried the following:

/mnt/md0/data 192.168.0.0/16(rw,async,no_root_squash,subtree_check)
/mnt/md0/data 192.168.0.0/16 *(ro,all_squash,insecure)
/mnt/md0/data 192.168.0.0/16(rw,sync,no_wdelay,insecure,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)

That last one.... I'm sure the anonuid and anongid is wrong for me..... somebody posted it in a forum and since this was my 3rd attempt at trying to make this work, I just left all the default stuff in. Everything in that folder is drwxrwxrwx and when I type showmount -e, I get:

Export list for server-pc:
/mnt/md0/data 192.168.0.0/16

Side question. A few weeks back, I was experimenting with a Synology box and mapped an NFS share on it from my Mint box and when I type showmount (no switches) I get:

Hosts on server-pc:
192.168.1.243

I have no idea where to go to nuke that old entry. (I'm almost positive that was the IP address of my Synology box that is no longer in my house.)
 
Old 01-06-2018, 11:55 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Checked permissions from server?
Code:
ls -ld /mnt/md0/data
getfacl /mnt/md0/data
 
Old 01-06-2018, 04:02 PM   #3
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Checked permissions from server?
Code:
ls -ld /mnt/md0/data
getfacl /mnt/md0/data
Results of those commands:

drwxrwxrwx 21 roadhazard roadhazard 4096 Dec 4 02:07 /mnt/md0/data

getfacl: Removing leading '/' from absolute path names
# file: mnt/md0/data
# owner: roadhazard
# group: roadhazard
user::rwx
group::rwx
other::rwx
 
Old 01-06-2018, 04:52 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
/mnt/md0/data is non empty in the server?
Is it /mnt/md0/data mount point or /mnt/md0 perhaps? In the later case, is /mnt/md0 shared elsewhere?

Last edited by keefaz; 01-06-2018 at 04:57 PM.
 
Old 01-06-2018, 05:02 PM   #5
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
/mnt/md0/data is non empty in the server?
Is it /mnt/md0/data mount point or /mnt/md0 perhaps? In the later case, is /mnt/md0 shared elsewhere?
The share is absolutely /mnt/md0/data and it's not empty. Lots of files in there. If I open up a terminal and cd /mnt/md0/data and hit enter and ls that directory, I see everything. (All from the server). Mounting from a client and doing a ls, nothing. Empty.

/mnt/md0/data is not shared any other way.
 
Old 01-06-2018, 05:14 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Can you see anything in the logs on client side right after you attempt to mount the nfs share?
 
Old 01-06-2018, 05:23 PM   #7
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Can you see anything in the logs on client side right after you attempt to mount the nfs share?
Unfortunately, I'm a newbie. Which logs? (Assuming something in /var/log ?)
 
Old 01-06-2018, 05:27 PM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Yes either dmesg command or tail /var/log/messages
 
Old 01-06-2018, 08:57 PM   #9
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Yes either dmesg command or tail /var/log/messages
Nothing in dmesg. Found this in the syslog:

Jan 6 20:59:47 server-pc exportfs[1589]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.0.0/16:/mnt/md0/data/".
Jan 6 20:59:47 server-pc exportfs[1589]: Assuming default behaviour ('no_subtree_check').
Jan 6 20:59:47 server-pc exportfs[1589]: NOTE: this default has changed since nfs-utils version 1.0.x
Jan 6 20:59:47 server-pc exportfs[1589]: exportfs: Failed to stat /mnt/md0/data/: No such file or directory

Did some more Googling and issued the following command:

exportfs -a (reboot....same problem)
exportfs -avr (reboot....same problem)

I even tried using 'Simple_NFS_GUI' and it entered virtually the same data I was using and it STILL isn't working. An Antergos and Manjaro machine can map the drive but when they open up the NFS share from their side, it opens..... to an empty folder.

People can crap on Samba all they want but for a newbie, getting the 'superior' NFS working is proving to be quite the task while Samba is as simple as right clicking a folder, going into the properties and sharing it. Then, from the client side, it just shows up when browsing the network. But NFS...................... NFS, not so much.
 
Old 01-06-2018, 09:01 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Did you try to share another directory?
say, on the server:
Code:
mkdir /mnt/myshare
touch /mnt/myshare/nothing.txt
/etc/exports:
Code:
/mnt/myshare 192.168.0.0/16(rw,async,no_root_squash,subtree_check)
 
Old 01-06-2018, 10:38 PM   #11
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Did you try to share another directory?
say, on the server:
Code:
mkdir /mnt/myshare
touch /mnt/myshare/nothing.txt
/etc/exports:
Code:
/mnt/myshare 192.168.0.0/16(rw,async,no_root_squash,subtree_check)
I made directory /home/roadhazard/deleteme and from the client, I was able to map it and see the test file inside it perfectly! So I guess that's a good step in the right direction but why in the world can't I see files/folders from /mnt/md0/data?

In case it matters, /mnt/md0 is a big RAID 6 array (mdadm) and /data/ is a folder off the root of that.

So I can share stuff in my home directory via NFS perfectly fine, just not a folder I mount from my array. Hmmmmmmmmmmmmm
 
Old 01-07-2018, 05:16 AM   #12
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Something to do with mdadm I think. If you can browse only from local, there is something that enable (mount?) dynamically the filesystem (udev?), and remote host can't do that via nfs (dynamic process not triggered from remote)

I don't know mdadm but I would look for a configuration that makes things more static, sorry can't help much more
 
Old 01-07-2018, 09:04 AM   #13
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Something to do with mdadm I think. If you can browse only from local, there is something that enable (mount?) dynamically the filesystem (udev?), and remote host can't do that via nfs (dynamic process not triggered from remote)

I don't know mdadm but I would look for a configuration that makes things more static, sorry can't help much more
Thanks for trying! Guess I'll do some Googling and see if there's problems with NFS shares on MDADM arrays.
 
Old 01-07-2018, 11:28 AM   #14
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hey road-hazard,

Can you clarify how/why your RAID array and its /data directory are set up under the /mnt directory ?

Thanks.
 
Old 01-07-2018, 01:21 PM   #15
road hazard
Member
 
Registered: Nov 2015
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
Hey road-hazard,

Can you clarify how/why your RAID array and its /data directory are set up under the /mnt directory ?

Thanks.
Current fstab:

# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdj1 during installation
UUID=6f1cf140-9801-4e95-bd11-c5ff83fe8ffd / xfs defaults,discard,noatime 0 1
# swap was on /dev/sdj5 during installation
UUID=82104591-3491-4549-bc2b-d8592d7662f9 none swap sw 0 0
/dev/md0 /mnt/md0 xfs defaults,nofail,discard 0 0
UUID=d2b035ab-aa40-427b-8729-af483ccf91ad /mnt/plex xfs defaults 0 0
#/nfs/allread *(ro,all_squash,insecure)
/dev/md/backup /mnt/backup ext4 defaults,nofail,discard 0 0

/dev/md0 mounted on /mnt/md0 (this is my RAID 6 array. On that array is /mnt/md0/Movies, /mnt/md0/TV Shows, etc. The directory I'm trying to share is /dev/md0/data. (/Movies and /TV Shows are shared via Samba and work just fine with clients being able to reach them)

mdadm.conf

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# definitions of existing MD arrays

# This file was auto-generated on Sat, 02 Dec 2017 21:21:22 -0500
# by mkconf $Id$
ARRAY /dev/md0 metadata=1.2 name=server-pc:0 UUID=99c9ad61:911cb77d:7d7d831d:032e2eee
ARRAY /dev/md/backup metadata=1.2 name=server-pc:bacup UUID=616e8892:40d17945:ebd2fb3b:914293d8

/dev/md0 is a RAID 6 array made up of 8, 4TB drives. (/mnt/md0)

/dev/md/backup is a RAID 5 array made up of 4, 8TB drives (/mnt/backup)
 
  


Reply

Tags
nfs mount network



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 08:25 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
Open Source Consulting | Domain Registration