Sorry we lost some posts because of database errors!

*New 12.1 series Release:
2020-09-01: XigmaNAS 12.1.0.4.7728 - released

*New 11.4 series Release:
2020-08-27: XigmaNAS 11.4.0.4.7718 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Anyone else have problems with "exports" file?

Network filesystems.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
jamaroney
Advanced User
Advanced User
Posts: 254
Joined: 13 Aug 2012 17:32
Location: Stroudsburg, PA
Status: Offline

Anyone else have problems with "exports" file?

#1

Post by jamaroney »

A couple of years ago, I started having problems accessing my NFS share. I finally figured out that sometimes, for whatever reason, XNAS (and its predecessor N4F), would leave the "exports" file blank.

So, I devised a simple workaround. On a different drive (/mnt/HDD), I created another "exports" file with my necessary specs, made it read-only, and then set up this command as a PreInit:

ln -s -F /mnt/HDD/exports /etc/exports

That cured all problems, and I never had any trouble since then.

But recently I thought that perhaps within the last few years whatever caused the problem might have been fixed in newer XNAS releases. So I eliminated the PreInit command. Unfortunately, soon afterward my "exports" file was again being left blank. So, I went back to the Preinit command.

Has anybody else experienced the same issue with their NFS share(s)? Just curious....

User avatar
ms49434
Developer
Developer
Posts: 847
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Anyone else have problems with "exports" file?

#2

Post by ms49434 »

jamaroney wrote:
22 Oct 2020 14:52
A couple of years ago, I started having problems accessing my NFS share. I finally figured out that sometimes, for whatever reason, XNAS (and its predecessor N4F), would leave the "exports" file blank.

So, I devised a simple workaround. On a different drive (/mnt/HDD), I created another "exports" file with my necessary specs, made it read-only, and then set up this command as a PreInit:

ln -s -F /mnt/HDD/exports /etc/exports

That cured all problems, and I never had any trouble since then.

But recently I thought that perhaps within the last few years whatever caused the problem might have been fixed in newer XNAS releases. So I eliminated the PreInit command. Unfortunately, soon afterward my "exports" file was again being left blank. So, I went back to the Preinit command.

Has anybody else experienced the same issue with their NFS share(s)? Just curious....
In a regular installation (embedded/full/RootOnZFS), /etc/exports is already a symbolic link to /var/etc/exports. The rc.d script mountd is writing to /var/etc/exports by default (you could set rc variable mountd_config but this would break the existing configuration).
Please verify that
/etc/exports is a symbolic link to /var/etc/exports.
/var/etc/exports reflects your WebGUI configuration.
NFS service is enabled and running.

I'm not using NFS actively but it always worked flawlessly during testing.
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

jamaroney
Advanced User
Advanced User
Posts: 254
Joined: 13 Aug 2012 17:32
Location: Stroudsburg, PA
Status: Offline

Re: Anyone else have problems with "exports" file?

#3

Post by jamaroney »

So I disabled my Preinit command, and after rebooting the server, here's what I have:

/etc/exports is a symbolic link to /var/etc/exports - YES.     Also, /root/exports is a symbolic link to /etc/exports

/var/etc/exports reflects your WebGUI configuration - NO (it's blank)

NFS service is enabled and running - YES
__________________________________
Here's the exports file I created (/mnt/HDD/exports):
/mnt/NAS -alldirs,quiet -mapall=root -network 192.168.1.0 -mask 255.255.255.0
__________________________________
And here's the nfsd setup from my config.xml file:

Code: Select all

	<nfsd>
		<numproc>4</numproc>
		<export>
			<param>
				<enable type="bool">1</enable>
				<uuid>37198923-31d7-457e-a136-54a05eac934b</uuid>
				<path>/mnt/NAS</path>
				<network>192.168.1.0/24</network>
				<description>NAS</description>
				<mapall>yes</mapall>
				<opt_alldirs type="bool">1</opt_alldirs>
			</param>
		</export>
		<root/>
		<auxparam/>
		<enable type="bool">1</enable>
	</nfsd>
When I provide the symlink from my /mnt/HDD/exports, no "/root/export" symlink file is made, and /var/etc/exports is still blank.

It's really no big deal, however. With the link to my /mnt/HDD/exports file, NFS has never given me any problems. But I'm curious as to why exports is blank unless I intervene.

User avatar
ms49434
Developer
Developer
Posts: 847
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Anyone else have problems with "exports" file?

#4

Post by ms49434 »

jamaroney wrote:
23 Oct 2020 13:57
So I disabled my Preinit command, and after rebooting the server, here's what I have:

/etc/exports is a symbolic link to /var/etc/exports - YES.     Also, /root/exports is a symbolic link to /etc/exports

/var/etc/exports reflects your WebGUI configuration - NO (it's blank)

NFS service is enabled and running - YES
__________________________________
Here's the exports file I created (/mnt/HDD/exports):
/mnt/NAS -alldirs,quiet -mapall=root -network 192.168.1.0 -mask 255.255.255.0
__________________________________
And here's the nfsd setup from my config.xml file:

Code: Select all

	<nfsd>
		<numproc>4</numproc>
		<export>
			<param>
				<enable type="bool">1</enable>
				<uuid>37198923-31d7-457e-a136-54a05eac934b</uuid>
				<path>/mnt/NAS</path>
				<network>192.168.1.0/24</network>
				<description>NAS</description>
				<mapall>yes</mapall>
				<opt_alldirs type="bool">1</opt_alldirs>
			</param>
		</export>
		<root/>
		<auxparam/>
		<enable type="bool">1</enable>
	</nfsd>
When I provide the symlink from my /mnt/HDD/exports, no "/root/export" symlink file is made, and /var/etc/exports is still blank.

It's really no big deal, however. With the link to my /mnt/HDD/exports file, NFS has never given me any problems. But I'm curious as to why exports is blank unless I intervene.
I took your nfsd configuration and pasted it into a test configuration file. As expected, /var/etc/exports was created without issues and no /root/exports link was created. The service started successfully.

I think something is messing up your nfs configuration. The next steps are to check
- If there is a script in System > Advanced > Command Scripts which modifes your nfs configuration or the mountd script which is located in /etc/rc.d/mountd.
- If there is more than one nfsd section in your config file, test should return 1:

Code: Select all

xml sel --template --value-of 'count(//nfsd)' --nl /conf/config.xml
- If mountd_config is set in System > Advanced > rc.conf.
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

jamaroney
Advanced User
Advanced User
Posts: 254
Joined: 13 Aug 2012 17:32
Location: Stroudsburg, PA
Status: Offline

Re: Anyone else have problems with "exports" file?

#5

Post by jamaroney »

I looked into all that you suggested, and came up with nothing.

I very much appreciate the time you took to look into this quite thoroughly. But at this point, given that there's no obvious simple solution and that my problem is readily fixed with a very easy workaround, I'll leave everything as it is.

Again, thanks!

Post Reply

Return to “NFS”