SOLVED how to nfs share multiple directories on LAN in 11.x

Status
Not open for further replies.

keithg

Explorer
Joined
May 15, 2013
Messages
92
I have upgraded from 9.x to 10.x to 11.x. I have always had a pxe root directory for pxe booting machines when needed. I just added a new distribution on my NAS and want to share the folder so I can have a rootfs for pxe boot. When I add (or delete) a folder from this NFS share, I get this error next to the box labeled 'Authorized Networks':
Code:
The network 192.168.2.0/24 is already being shared and cannot be used twice for the same filesystem

This folder is supposed to be shared for any ip on my system.

I have a single volume (3 drives as a single volume mounted under /mnt/first_NAS) and have multiple nfs shares listed under "Unix (NFS) Shares" and each 'share' has multiple folders shared and I would like all of them available to 192.168.2.0/24. How do I set this up in 11.x. It previously worked in 10.x and now I cannot delete nor add any folders without getting this error and do not know how to resolve it.

For example, I have this share listed as 'pxe_rootfs' and there are multiple folders (for multiple distros) listed when I select 'pxe_rootfs' each folder is similar to "mnt/first_NAS/pxe_linux/distros/gubuntu_16_04_1". Like I said, this worked in 10.x, but since upgrade it no longer works. I anm assuming I have something configured incorrectly, but cannot seem to google a solution.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
NFS won't let you share parent and sub directories separately. You need to share the parent directory and check the "All directories" box to mount a directory under the parent.
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
M0nkey,

Thanks, but now, how do I delete the directories. Every time I try to edit it, I get that error and cannot clear it. Do I have to delete and re-create?
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
yes, I can do nothing. If I stop the service, all I can do is delete the share, which I did and now I cannot create a share as it tells me the same thing. What I do not get is that this was 'correct' or at least 'accepted' by 9.10 and 10.x and I never had a problem with it.

so, how is this 'supposed to be done'?

on the NAS, I have NFS shared backup folders which are 'owned' by the individual users. (/Backups/UserA, /Backups/UserB, etc) I also want to have a root_fs shared folders for my raspberry pis (pi_rootfs/Pi1, pi_rootfs/Pi2, etc) and I want to have these rootfs shared for my pxe boot. (/pxe_root/Distro1, etc.) How would one set this up?
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
No matter what I do, I cannot create a new share. My NAS is /mnt/first_NAS and all folders are under here. I have some which need to be shared with maproot and such and some which are owned by users. All of these folders reside in /mnt/first_NAS. I tried to add a new folder and didn't even try to pot a network, but a single machine and I get the same thing, but with 0.0.0.0/24.

I originally set this up with 9.3, I think and have upgraded all along, rebuilding jails as I went and such. This is the first time I've run into this where I cannot create a folder.

I am upgrading form 11.1-U2 to 11.1-U4 and will see if anything changes.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@keithg It might help if you could clarify what you mean when you talk of “folders”. Are you talking about datasets, nested datasets, or directories created within a dataset?

E.g

All of these folders reside in /mnt/first_NAS. I tried to add a new folder and didn't even try to pot a network, but a single machine and I get the same thing, but with 0.0.0.0/24.

Do you mean add a new dataset under the storage tab? And is this new dataset nested under another dataset which is already shared via NFS with the “All Directories” option ticked?

It might also help if you post the contents of /etc/exports
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
@KrisBee, thanks for the help. Yes, I always mess up the nomenclature.... I have a single volume made from 3 drives. it is mounted under /mnt/first_NAS. All the folders I am interested in sharing are in the root of this drive/volume (first_NAS). Like I said, I have been using this for 3 or more years and this is how I set it up, then, with 3 groups of NFS shares: 1 for users files, 1 for pi_rootfs, 1 for PXE_bootfs. Each one of these shares has multiple folders shared. I'm not saying I wasn't doing something improper or that I even know what I am doing, but this is what I set up and it worked. I have not modified any of these since I upgraded to 11.x and now it no longer works the same way.

My /etc/exports
Code:
$ cat /etc/exports
V4: / -sec=sys
/mnt/first_NAS/pi_root/rune_pi_2017 /mnt/first_NAS/pi_root/rune_pi_nfs_2017 /mnt/first_NAS/pi_root/rune_pi_nfs  -maproot="root":"wheel" 192.168.2.197 192.168.2.102 192.168.2.196 192.168.2.101 192.168.2.191 192.168.2.18
/mnt/first_NAS/pi_root/pi_home /mnt/first_NAS/Backup/Greta /mnt/first_NAS/Backup/Kris /mnt/first_NAS/Motion /mnt/first_NAS/Recipes /mnt/first_NAS/Backup/Keith /mnt/first_NAS/Backup/Gus /mnt/first_NAS/Media  -mapall="nobody":"users" -network 192.168.2.0/24

My volume that I am trying create NFS shares on
Code:
/mnt/first_NAS $ ls
Backup		  jails		   MinecraftServer nas_files	   PDF			 pxe_linux	   win_XP
home			Media		   Motion		  partial_movies  pi_root		 Recipes
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Talking about "folders" in the context of zfs is a bit vague, better to use the correct terminology of datasets and/or directories created within datasets.

For example, your use of ls does not distinguish datasets and directories that might exist within /mnt/first_NAS. Using zfs list would be more informative.

The objects that appear in your exports file should all be mount paths to datasets. They shouldn't be anything else, as this is what you pick when creating NFS shares via the FreeNAS UI. If any of these mount paths are not datasets, as would be listed by zfs list, then that would be odd.

I can't see any conflicts in your exports file. As root on your FreeNAs box, what is the output of showmount -e localhost ?

When you say
My volume that I am trying create NFS shares on
, what exact path are you trying to use/choose when creating a new NFS share via the FreeNAS UI? What "Authorized networks/Authorized IP addresses or hosts" where you using, was "All directories" checked and what is the exact error message returned when you try to create a new share?

I assume if you have bound your FreeNAS NFS service to an IP, you've used a valid address.
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
@KrisBee here is more information.

My NAS is on 192.168.2.198 (I have never moved it since it has been set up)

What I am attempting to do is to share (for now) /mnt/first_NAS/pxe_linux/distros/ubuntu_18_04. I want to share it to 192.168.2.0/24. It needs to have maproot="root":"wheel".

to do this, in the UI, I click:
add Unix (NFS) Share
I put "/mnt/first_NAS/pxe_linux/distros/ubuntu_18_04" in the 'path'
I put 192.168.2.0/24 in the authorized networks box
select maproot user as 'root' and maproot group as 'wheel'
When I click 'ok', I get the error:
Code:
The network 192.168.2.0/24 is already being shared and cannot be used twice for the same filesystem

If I put a valid IP address in authorized addresses and delete the IP range in the Authorized Networks box, I get this:
Code:
The network 0.0.0.0/0 is already being shared and cannot be used twice for the same filesystem


Do I need to set up a separate dataset for each NFS share? This is not how I initially set it up. How would I do that now?

Code:
 ~ $ zfs list
NAME														 USED  AVAIL  REFER  MOUNTPOINT
first_NAS												   1.54T  1.97T  1.51T  /mnt/first_NAS
first_NAS/.system											566M  1.97T   192K  legacy
first_NAS/.system/configs-7bfeeafc432c477c9cad4ceee762fbbd   389M  1.97T   389M  legacy
first_NAS/.system/cores									 52.3M  1.97T  52.3M  legacy
first_NAS/.system/rrd-7bfeeafc432c477c9cad4ceee762fbbd	   192K  1.97T   192K  legacy
first_NAS/.system/samba4									10.8M  1.97T  10.8M  legacy
first_NAS/.system/syslog-7bfeeafc432c477c9cad4ceee762fbbd	113M  1.97T   113M  legacy
first_NAS/jails											 21.1G  1.97T   147M  /mnt/first_NAS/jails
first_NAS/jails/.warden-template-pluginjail--x64			1.29G  1.97T  58.5M  /mnt/first_NAS/jails/.warden-template-pluginjail--x64
first_NAS/jails/.warden-template-pluginjail-10.3-x64		 891M  1.97T   891M  /mnt/first_NAS/jails/.warden-template-pluginjail-10.3-x64
first_NAS/jails/.warden-template-pluginjail-11.0-x64		1.00G  1.97T  1.00G  /mnt/first_NAS/jails/.warden-template-pluginjail-11.0-x64
first_NAS/jails/.warden-template-standard--x64			  2.91G  1.97T  2.83G  /mnt/first_NAS/jails/.warden-template-standard--x64
first_NAS/jails/.warden-template-standard-11.0-x64		  3.41G  1.97T  3.41G  /mnt/first_NAS/jails/.warden-template-standard-11.0-x64
first_NAS/jails/Print_server								1.90G  1.97T  4.95G  /mnt/first_NAS/jails/Print_server
first_NAS/jails/firefly_1									178M  1.97T  1.17G  /mnt/first_NAS/jails/firefly_1
first_NAS/jails/minecraft_1								 6.94G  1.97T  8.43G  /mnt/first_NAS/jails/minecraft_1
first_NAS/jails/plexmediaserver_1						   2.47G  1.97T  3.46G  /mnt/first_NAS/jails/plexmediaserver_1


Code:
showmount -e localhost
Exports list on localhost:
/mnt/first_NAS/pi_root/rune_pi_nfs_2017 192.168.2.197 192.168.2.102 192.168.2.196 192.168.2.101 192.168.2.191 192.168.2.18
/mnt/first_NAS/pi_root/rune_pi_nfs 192.168.2.197 192.168.2.102 192.168.2.196 192.168.2.101 192.168.2.191 192.168.2.18
/mnt/first_NAS/pi_root/rune_pi_2017 192.168.2.197 192.168.2.102 192.168.2.196 192.168.2.101 192.168.2.191 192.168.2.18
/mnt/first_NAS/pi_root/pi_home	 192.168.2.0
/mnt/first_NAS/Recipes			 192.168.2.0
/mnt/first_NAS/Motion			  192.168.2.0
/mnt/first_NAS/Media			   192.168.2.0
/mnt/first_NAS/Backup/User2		 192.168.2.0
/mnt/first_NAS/Backup/User1		192.168.2.0
/mnt/first_NAS/Backup/User3		  192.168.2.0
/mnt/first_NAS/Backup/User4		192.168.2.0
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I neglected to ask which FreeNAs build you are running. Is it FreeNAS-11.1-U4?

I was just looking at https://redmine.ixsystems.com/issues/27667 which seems at first sight similar. A person's NFS shares worked in 9.10 but not 11.1. They get the same error message about "... already being shared and cannot be used twice for the same filesystem".

But I cannot see that you have/are attempting to share the same dataset twice. Particularly as you appear to have created a new dataset, first_NAS/pxe_linux/distros/ubuntu_18_04 and neither it, or its parent datasets, have been previously shared at all. I suppose the validation code behind the FreeNAS UI must scan existing shares to prevent this from happening, which for some reason is throwing up this error on your system.

The only thing that looks vaguely suspicious are the shares under /mnt/first_NAS/pi_root/. Does removing /mnt/first_NAS/pi_root/pi_home share change anything? I wouldn't expect it to, but ....
 
Last edited:

keithg

Explorer
Joined
May 15, 2013
Messages
92
If I try to delete the share, I get the same error:
Code:
The network 192.168.2.0/24 is already being shared and cannot be used twice for the same filesystem


Doe sthe system want me to have a separate dataset for each NFS share? Is that 'the right way'? to do it?

I read the bug report and it sure seems that I have the same issue. It worked for me under 9.1,9.3,9.10. I have not tried to change anything since then, but now when I try to add a distro folder or change any of the shares, it fails. I edited the /etc/exports file as this sounds like a UI over-protection issue and not an underlying system bug. How do I get it to re-scan the /etc/exports file to see if it actually exports the share?
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
how can I add this share? Is this 'intended operation' or is it a bug? Can I manually edit /etc/exports and have it stick past a reboot, somehow? Possibly put this in it.
Code:
/mnt/first_NAS/pxe_linux/distros/ubuntu_18_04  -maproot="root":"wheel" -network 192.168.2.0/24
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Apologies, interruption meant I didn't complete my last post #11 ....

If you create a share like /mnt/first_NAS/pi_root/rune_pi_nfs restricted to more than one IP address in the same subnet, this works in FreeNAS-11.1-U4 if all the ip addresses are added to the Authorized IP addresses or hosts box in one go when the share is first created. But if you tried to do this piecemeal by repeated share creation on the same dataset restricted to different IP address in the same subnet, then you will get the error you're seeing.

I suspect it's the shares you've made with multiple IP addresses per share that is causing your problem. It looks like your updated FreeNAS could be treating those first three shares listed by the showmount command as being in error in version 11.1.

Editing the exports file by hand is not a good idea in FreeNAS. Things needs to work via the web UI so the internal config DB is properly updated and the correct exports file is generated.

Depending on what you need to keep working, I would delete all those
/mnt/first_NAS/pi_root/rune_ shares and then see if you can add your Ubuntu_18

If that works, then re-create those deleted shares adding all the IPs needed for each share in one go. If the system won't even allow you to delete those shares, I'm not sure there's a workaround apart from rolling back to version 9.10 and trying sort things out from there.

 

keithg

Explorer
Joined
May 15, 2013
Messages
92
Well, that didn't work, either. I am running 11.1-U4. I deleted the rootfs shares and now only have the first share:
Code:
# showmount -e localhost
Exports list on localhost:
/mnt/first_NAS/pi_root/pi_home	 192.168.2.0
/mnt/first_NAS/Recipes			 192.168.2.0
/mnt/first_NAS/Motion			  192.168.2.0
/mnt/first_NAS/Media			   192.168.2.0
/mnt/first_NAS/Backup/User1		192.168.2.0
/mnt/first_NAS/Backup/User2		192.168.2.0
/mnt/first_NAS/Backup/User3		192.168.2.0
/mnt/first_NAS/Backup/User4		192.168.2.0


Code:
# cat /etc/exports
V4: / -sec=sys
/mnt/first_NAS/pi_root/pi_home /mnt/first_NAS/Backup/User4 /mnt/first_NAS/Backup/User2 /mnt/first_NAS/Motion /mnt/first_NAS/Recipes /mnt/first_NAS/Backup/User1 /mnt/first_NAS/Backup/User3 /mnt/first_NAS/Media  -mapall="nobody":"users" -network 192.168.2.0/24


This mount still seems to be working. When I try to add another share, I get the same error.
I put this in the path /mnt/first_NAS/pxe_linux/distros
set the network to 192.168.2.0/24
maproot user to root, maproot group to wheel and hit OK, I still get :
Code:
The network 192.168.2.0/24 is already being shared and cannot be used twice for the same filesystem

If I clear this then put 192.168.2.101 as an authorized host, I get this:
Code:
The network 0.0.0.0/0 is already being shared and cannot be used twice for the same filesystem


The relevant lines from /var/log/messages:
May 2 16:09:58 NAS mountd[2015]: can't change attributes for /mnt/first_NAS/pxe_linux/distros/ubuntu_18_04: netcred already exists for given addr/mask
May 2 16:09:58 NAS mountd[2015]: bad exports list line /mnt/first_NAS/pxe_linux/distros/ubuntu_18_04 -maproot


At this rate, if I delete the last one, I will have no more NFS shares... This makes no sense to me. It has worked for a number of years...
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Well, no one else has chimed in with a possible explanation or workaround, but clearly coding changes between FreeNAS 9 to 11 plus even possibly within the FreeBSD base are the likely cause.

Did you google those error messages in the log? They appear to relate to NFS failure in the case of an invalid exports file - see for example: https://lists.freebsd.org/pipermail/svn-src-head/2014-November/064631.html and the "netcred" message is buried in the code for freebsd/sys/kern/vfs_export.c

So, is your exports file incorrectly formatted for some reason, or does FreeNAS 11 fail to create a valid export file when attempting to add a new record to your existing exports file? The output of your cat /etc/exports looks a little odd as I'd expect to see something like this:

Code:
# cat /etc/exports
V4: / -sec=sys
/mnt/first_NAS/pi_root/pi_home -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Backup/User4 -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Backup/User2 -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Motion  -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Recipes -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Backup/User1 -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Backup/User3 -mapall="nobody":"users" -network 192.168.2.0/24
/mnt/first_NAS/Media -mapall="nobody":"users" -network 192.168.2.0/24


If it's true the system cannot create a valid exports file based on your existing exports file, how do you clear the error? You'd think that removing all shares would give you an empty exports file and clear the config DB. Then you'd be able to re-create all your shares. I can't think of another explanation.
 
Last edited:

keithg

Explorer
Joined
May 15, 2013
Messages
92
Now I have deleted all my shares, and the showmount showed nothing. Then I added one backup directory and put only one ip address to share it with. I cannot add any more shares. As soon as I do, the UI either says that I cannot share it with a single ip address as it is already shared with 0.0.0.0/0 or if I try to put *.0/24, it says that it is already shared and cannot be used twice.

Code:
# showmount -e localhost
Exports list on localhost:


I add one share
Code:
#  showmount -e localhost
Exports list on localhost:
/mnt/first_NAS/Backup/User1		192.168.2.101


I then try to add the '/mnt/first_NAS/pxe_linux/distros' directory and share it with 192.168.2.0/24 maproot root:wheel and I get

Code:
The network 192.168.2.0/24 is already being shared and cannot be used twice for the same filesystem


I tried to go back to a different boot environment and it takes forever and then comes back with what looks like an error report.

Code:
Environment:

Software Version: FreeNAS-11.1-U4 (89e3d93bc)
Request Method: POST
Request URL: https://192.168.2.198/system/bootenv/activate/11.1-U2/


Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  42.			 response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.			 response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  178.			 response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
  162.		 return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.				 return view_func(request, *args, **kwargs)
File "./freenasUI/system/views.py" in bootenv_activate
  281.			 active = c.call('bootenv.activate', name)
File "./freenasUI/system/views.py" in bootenv_activate
  281.			 active = c.call('bootenv.activate', name)
File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py" in call
  416.			 raise CallTimeout("Call timeout")

Exception Type: CallTimeout at /system/bootenv/activate/11.1-U2/
Exception Value: Call timeout


Do I need to wipe the sd card and start over from iso? If so, I am wondering if I should use 11.1-U2 (which was working) instead of 11.1-U4. I upgraded to stop the syslog spamming I was getting and apparently, this attempted upgrade hosed the system.
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Sorry to learn the problems persist. (I didn't think using sd cards is recommended, better to use an USB memory stick, neither are as good as a SSD.)

Did you save the config when everything was working in 11.1-U2 ? Assuming there was no zpool features upgrade when you went from 11.1-U2 to 11.1-U4, shouldn't a fresh install of
11.1-U2 and loading the saved config get you back to where you were? Test it out in virtualbox if you are uncertain.

But before you do that, did you only post part of the output of zfs list in #10 above, because where are the datasets you were sharing?

I then try to add the '/mnt/first_NAS/pxe_linux/distros' directory and share it with 192.168.2.0/24 maproot root:wheel and I get

You should only be trying to share datasets by selecting their mount paths when creating shares.
 
Last edited:

keithg

Explorer
Joined
May 15, 2013
Messages
92
Well, I did not know that using a microSD in a USB adapter was not 'sanctioned'. The last scrub of the boot volume showed no problems. I can grab a USB drive and reset everything. I was able to boot back to 11.0-U2 (previous image) and it rebooted. Interestingly, when it rebooted, the NFS shares I thought I had deleted were no longer deleted when it rebooted in U2. I did not restore the config, I just rebooted. I have a config I saved right before I attempted an upgrade to 11.1-U4, so I can go the iso route and rebuild it with 11.1-U4.

When I attempt to create a share dataset, I do use the selection to determine the mount path.

Under 11.1-U2, I still get the same response when I attempt to modify or add a share. It complains that it is already shared and I cannot select 192.168.2.0/24

I cut the boot drive off my ZFS list. It is here:
Code:
root@NAS:~ # zfs list
NAME														 USED  AVAIL  REFER  MOUNTPOINT
first_NAS												   1.54T  1.97T  1.51T  /mnt/first_NAS
first_NAS/.system											567M  1.97T   192K  legacy
first_NAS/.system/configs-7bfeeafc432c477c9cad4ceee762fbbd   389M  1.97T   389M  legacy
first_NAS/.system/cores									 52.4M  1.97T  52.4M  legacy
first_NAS/.system/rrd-7bfeeafc432c477c9cad4ceee762fbbd	   192K  1.97T   192K  legacy
first_NAS/.system/samba4									10.7M  1.97T  10.7M  legacy
first_NAS/.system/syslog-7bfeeafc432c477c9cad4ceee762fbbd	114M  1.97T   114M  legacy
first_NAS/jails											 21.1G  1.97T   147M  /mnt/first_NAS/jails
first_NAS/jails/.warden-template-pluginjail--x64			1.29G  1.97T  58.5M  /mnt/first_NAS/jails/.warden-template-pluginjail--x64
first_NAS/jails/.warden-template-pluginjail-10.3-x64		 891M  1.97T   891M  /mnt/first_NAS/jails/.warden-template-pluginjail-10.3-x64
first_NAS/jails/.warden-template-pluginjail-11.0-x64		1.00G  1.97T  1.00G  /mnt/first_NAS/jails/.warden-template-pluginjail-11.0-x64
first_NAS/jails/.warden-template-standard--x64			  2.91G  1.97T  2.83G  /mnt/first_NAS/jails/.warden-template-standard--x64
first_NAS/jails/.warden-template-standard-11.0-x64		  3.41G  1.97T  3.41G  /mnt/first_NAS/jails/.warden-template-standard-11.0-x64
first_NAS/jails/Print_server								1.90G  1.97T  4.95G  /mnt/first_NAS/jails/Print_server
first_NAS/jails/firefly_1									179M  1.97T  1.17G  /mnt/first_NAS/jails/firefly_1
first_NAS/jails/minecraft_1								 6.94G  1.97T  8.43G  /mnt/first_NAS/jails/minecraft_1
first_NAS/jails/plexmediaserver_1						   2.45G  1.97T  3.44G  /mnt/first_NAS/jails/plexmediaserver_1
freenas-boot												4.03G  3.11G	64K  none
freenas-boot/ROOT										   4.01G  3.11G	29K  none
freenas-boot/ROOT/11.0-U4								   8.41M  3.11G   738M  /
freenas-boot/ROOT/11.1-RELEASE							  6.43M  3.11G   833M  /
freenas-boot/ROOT/11.1-U1								   7.89M  3.11G   835M  /
freenas-boot/ROOT/11.1-U2								   3.17G  3.11G   835M  /
freenas-boot/ROOT/11.1-U4									838M  3.11G   840M  /
freenas-boot/grub										   6.85M  3.11G  6.85M  legacy
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Look at your zfs list. Same question, where are the datasets your have been sharing? This goes back to what I first said in #7 & #9 above and comparing output of your ls and zfs list and you should be sharing datasets.

If your doing what I think you are doing, then I'm guilty of missing this before (Including the clue when you asked about having a dataset per share and the fact you've not used "all directories" on any of your shares, because you can only do that on shared datasets.)

I think you've shared directories under /mnt/first_NAS and not datasets in the past. For example, is /mnt/first_NAS/Media a directory or dataset? It's not in your zfs list, so I wouldn't expect to see it listed under the storage.

Contrary to what I thought, it is possible to either type in a "directory path" when creating an NFS share via the web UI, or browse and select it. But it can lead to the sort of problems you've encountered.

For example:

Code:
root@freenas:/ # zfs list | grep share	
NasPool/nfs_share_parent								   272K  17.3G	96K  /mnt/NasPool/nfs_share_parent
NasPool/nfs_share_parent/nfs_share_child1				   88K  17.3G	88K  /mnt/NasPool/nfs_share_parent/nfs_share_child1
NasPool/nfs_share_parent/nfs_share_child2				   88K  17.3G	88K  /mnt/NasPool/nfs_share_parent/nfs_share_child2
root@freenas:/ # cd /mnt/NasPool/nfs_share_parent
root@freenas:/mnt/NasPool/nfs_share_parent # ls -l
total 3
drwxr-xr-x  2 chris  chris  3 May  3 10:02 nfs_share_child1
drwxr-xr-x  2 chris  chris  2 May  3 09:50 nfs_share_child2
drwxr-xr-x  2 chris  chris  3 May  4 08:45 pdir1
drwxr-xr-x  2 chris  chris  2 May  4 08:51 pdir2
-rw-r--r--  1 chris  chris  0 May  4 08:44 pfile1
-rw-r--r--  1 chris  chris  0 May  4 08:44 pfile2 


pdir1 and pdir2 and not datasets, they are directories created under the dataset NasPool/nfs_share_parent

The directory pdir1 can be shared, along with the child datasets

Code:
root@freenas:/mnt/NasPool/nfs_share_parent # cat /etc/exports
V4: / -sec=sys
/mnt/NasPool/nfs_share_parent/pdir1  -maproot="root":"wheel" -sec=sys 192.168.0.11 192.168.0.22
/mnt/NasPool/nfs_share_parent/nfs_share_child2  -alldirs -maproot="root":"wheel" -sec=sys 192.168.0.201 192.168.0.99
/mnt/NasPool/nfs_share_parent/nfs_share_child1  -alldirs -maproot="root":"wheel" -sec=sys 192.168.0.201 192.168.0.99 192.168.0.88
root@freenas:/mnt/NasPool/nfs_share_parent #


But trying to share pdir2 produces the error message:

"The network 0.0.0.0/0 is already being shared and cannot be used twice for the same filesystem"

As each dataset has its own filesystem, If I shared pdir1 then I've shared the filesystem of its parent dataset once and cannot share it a second time.

Why you went from a working share set to non-working share set isn't clear. Make life easy and just share datasets.
 
Last edited:
Status
Not open for further replies.
Top