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

[HOWTO] mutiple NFS shares due invalid config setting

Network filesystems.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
pi3ch
NewUser
NewUser
Posts: 6
Joined: 20 Nov 2012 17:18
Status: Offline

[HOWTO] mutiple NFS shares due invalid config setting

#1

Post by pi3ch »

When I set to share mutiple dirs to a same subnet, I get the following /etc/exports generated:

Code: Select all

/mnt/disk1/video -mapall=root -network 192.168.1.0 -mask 255.255.255.0
/mnt/disk1/music -mapall=root -network 192.168.1.0 -mask 255.255.255.0
/mnt/disk1/book -mapall=root -network 192.168.1.0 -mask 255.255.255.0
and on the client I cannot see all the shares:

Code: Select all

$mount -e 192.168.1.10
Export list for 192.168.1.10:
/mnt/disk1/video 192.168.1.0
and error on server:

Code: Select all

mountd[18152]: bad exports list line /mnt/disk1/book -mapall
Mocking around for a while I finally found below page:

According to http://www.freebsd.org/doc/en_US.ISO885 ... k-nfs.html:
In /etc/exports, each line represents the export information for one file system to one host. A remote host can only be specified once per file system, and may only have one default entry. For example, assume that /usr is a single file system. The following /etc/exports would be invalid:

Code: Select all

# Invalid when /usr is one file system
/usr/src   client
/usr/ports client
One file system, /usr, has two lines specifying exports to the same host, client. The correct format for this situation is:

Code: Select all

/usr/src /usr/ports  client
so currently my workaround is to manually create exports list:

Code: Select all

/mnt/disk1/pictures /mnt/disk1/music /mnt/disk1/video -mapall=root -network 192.168.1.0 -mask 255.255.255.0
and restart the service:

Code: Select all

kill -HUP `cat /var/run/mountd.pid`

User avatar
ChriZathens
Forum Moderator
Forum Moderator
Posts: 803
Joined: 23 Jun 2012 09:14
Location: Athens, Greece
Contact:
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#2

Post by ChriZathens »

Thanks for the hint!
I hope it will get fixed soon!
My Nas
  1. Case: Fractal Design Define R2
  2. M/B: Supermicro x9scl-f
  3. CPU: Intel Celeron G1620
  4. RAM: 16GB DDR3 ECC (2 x Kingston KVR1333D3E9S/8G)
  5. PSU: Chieftec 850w 80+ modular
  6. Storage: 8x2TB HDDs in a RaidZ2 array ~ 10.1 TB usable disk space
  7. O/S: XigmaNAS 11.2.0.4.6625 -amd64 embedded
  8. Extra H/W: Dell Perc H310 SAS controller, crosflashed to LSI 9211-8i IT mode, 8GB Innodisk D150SV SATADOM for O/S

Backup Nas: U-NAS NSC-400, Gigabyte MB10-DS4 (4x4TB Seagate Exos disks in RaidZ configuration - 32GB RAM)

User avatar
ChriZathens
Forum Moderator
Forum Moderator
Posts: 803
Joined: 23 Jun 2012 09:14
Location: Athens, Greece
Contact:
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#3

Post by ChriZathens »

I would also like to add that if you have more than one Pool under /mnt, each one's shares have to be added in its own line
My Nas
  1. Case: Fractal Design Define R2
  2. M/B: Supermicro x9scl-f
  3. CPU: Intel Celeron G1620
  4. RAM: 16GB DDR3 ECC (2 x Kingston KVR1333D3E9S/8G)
  5. PSU: Chieftec 850w 80+ modular
  6. Storage: 8x2TB HDDs in a RaidZ2 array ~ 10.1 TB usable disk space
  7. O/S: XigmaNAS 11.2.0.4.6625 -amd64 embedded
  8. Extra H/W: Dell Perc H310 SAS controller, crosflashed to LSI 9211-8i IT mode, 8GB Innodisk D150SV SATADOM for O/S

Backup Nas: U-NAS NSC-400, Gigabyte MB10-DS4 (4x4TB Seagate Exos disks in RaidZ configuration - 32GB RAM)

waldo22
Starter
Starter
Posts: 29
Joined: 27 Nov 2012 16:20
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#4

Post by waldo22 »

pi3ch wrote:...so currently my workaround is to manually create exports list:
I was able to do this using the web gui, separating each entry with a space.

No need to do it from the command line.

-Wes

Danswan
NewUser
NewUser
Posts: 5
Joined: 28 Jun 2012 01:00
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#5

Post by Danswan »

Thanks for this, I've been confused all morning as to why only my first share was working!

pointman05
NewUser
NewUser
Posts: 3
Joined: 23 Aug 2013 21:11
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#6

Post by pointman05 »

Has this been fixed? I just ran into this aswell... It is odd that I have two servers set up almost identical. One being the backup of the other. The main difference is that one is using ZFS and the other UFS. The one using ZFS has no issues with the exports being setup with 2 lines for a share that has the same default entry. However with the exports being on UFS it does have this issue.

How is everybody getting around this? Post_Init Script?

pointman05
NewUser
NewUser
Posts: 3
Joined: 23 Aug 2013 21:11
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#7

Post by pointman05 »

OK I stand Corrected this has been fixed it is just not documented well.

In order to get this configuration working you must separate the paths by a space in the Nas4Free NFS GUI section.

User avatar
Lee Sharp
Advanced User
Advanced User
Posts: 250
Joined: 13 May 2013 21:12
Contact:
Status: Offline

Re: [HOWTO] mutiple NFS shares due invalid config setting

#8

Post by Lee Sharp »

So... This caught me for a while. I think we need this warning from FreeBSD on the web GUI page.

"In /etc/exports, each line defines the export information for one file system to one or more clients. A remote host can only be specified once per file system."

It is VERY unintuitive as I have ZFS and my NFS shares are all separate Datasets. (which is kinda a separate filesystem)

How about;

Code: Select all

Each share defines the export information for one file system to one or more clients. A remote host can only be specified ONCE per file system.

If you wish to share multiple paths to a single user or network, enter them all on one live seperated by spaces.

Example; /mnt/zpool01/ISO-storage /mnt/zpool01/vmware-server-vm-storage /mnt/zpool01/vmware-view-vm-storage

Post Reply

Return to “NFS”