LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can see my NFS share but not the files/folders inside it (https://www.linuxquestions.org/questions/linux-newbie-8/can-see-my-nfs-share-but-not-the-files-folders-inside-it-4175621092/)

road hazard 01-06-2018 12:30 PM

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.)

keefaz 01-06-2018 12:55 PM

Checked permissions from server?
Code:

ls -ld /mnt/md0/data
getfacl /mnt/md0/data


road hazard 01-06-2018 05:02 PM

Quote:

Originally Posted by keefaz (Post 5802980)
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

keefaz 01-06-2018 05:52 PM

/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?

road hazard 01-06-2018 06:02 PM

Quote:

Originally Posted by keefaz (Post 5803064)
/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.

keefaz 01-06-2018 06:14 PM

Can you see anything in the logs on client side right after you attempt to mount the nfs share?

road hazard 01-06-2018 06:23 PM

Quote:

Originally Posted by keefaz (Post 5803076)
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 ?)

keefaz 01-06-2018 06:27 PM

Yes either dmesg command or tail /var/log/messages

road hazard 01-06-2018 09:57 PM

Quote:

Originally Posted by keefaz (Post 5803085)
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.

keefaz 01-06-2018 10:01 PM

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)

road hazard 01-06-2018 11:38 PM

Quote:

Originally Posted by keefaz (Post 5803142)
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

keefaz 01-07-2018 06:16 AM

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

road hazard 01-07-2018 10:04 AM

Quote:

Originally Posted by keefaz (Post 5803206)
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.

Rickkkk 01-07-2018 12:28 PM

Hey road-hazard,

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

Thanks.

road hazard 01-07-2018 02:21 PM

Quote:

Originally Posted by Rickkkk (Post 5803286)
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)


All times are GMT -5. The time now is 09:39 AM.