Project

General

Profile

Bug #27667

Allow multiple NFS shares of the same dataset

Added by Gavin Cameron over 1 year ago. Updated 10 months ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Seen in:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Dell PowerEdge T30
Intel Xeon E3-1225 v5 (3.3GHz)
SK Hynix HMA41GU7AFR8N (ECC DDR4 8GBytes)
Sandisk Ultra Fit (16GByte USB 3.0) x2 - mirrored FreeNAS filesystem
Western Digital Red (3TB) x4 - RAID-Z2 storage

ChangeLog Required:
No

Description

I've just installed v11.1 on my new hardware (migrating my file-server from a Linux box over to FreeNAS), and intending to have NFS shares identical to my Linux box: some shares are read only to the local network, but read-write to specific nodes. For example (this is a snippet from my Linux box's /etc/exports file):

# Generic read-only access for everyone on network
/export/music        192.168.1.0/24(ro,nohide,insecure,no_subtree_check,async)

# Specific write access for picard
/export/music        picard(rw,nohide,insecure,no_subtree_check,async)

When attempting this in the 11.1 GUI, I get an error:

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

The GUI will not proceed to create the export.

I even attempted to share the same dataset to completely different networks, and it still failed.

I asked the forum for help (so a more fulsome story here): https://forums.freenas.org/index.php?threads/nfs-share-ro-to-network-but-rw-to-nodes.60419/

After confirming that I wasn't mad (kind of), I tested the exact scenario on a VM running version 9.10 and it works exactly as expected (screenshot is in the forum post). The resulting /etc/exports is as expected:

[root@freenas] ~# cat /etc/exports 
/mnt/big-drive/photos  picard
/mnt/big-drive/photos  -ro -network 192.168.1.0/24

Looks like a GUI bug in v11.

Associated revisions

Revision 83692870 (diff)
Added by Vladimir Vinogradenko 11 months ago

fix(nfs): Be less restrictive about multiple NFS share of the same dataset

Ticket: #27667

History

#1 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Release Council to William Grzybowski

William: can the dataset restriction be loosened for some NFS configurations?

#2 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to 15

Whats the IP of "picard"?

Just because the export line shows up in 9.10 does not mean it works correctly. Since FreeBSD does not allow same share within the same overlapping network.

It could be an issue handling the hostname as well.

A workaround could be using the IP instead of hostname.

#3 Updated by William Grzybowski over 1 year ago

  • Category changed from GUI (new) to 2

#4 Updated by Gavin Cameron over 1 year ago

13837

William Grzybowski wrote:

Whats the IP of "picard"?

Just because the export line shows up in 9.10 does not mean it works correctly. Since FreeBSD does not allow same share within the same overlapping network.

It could be an issue handling the hostname as well.

A workaround could be using the IP instead of hostname.

Thanks for picking this up.

The IP address for "picard" is 192.168.1.10... however I have to disagree with your comment that "FreeBSD does not allow same share within the same overlapping network." as the attached screenshot shows:
  • two shares of the same filesystem, RO to network, and RW to "picard" in 9.10 GUI and /etc/exports (terminal)
  • "v-ger" (192.168.1.1) and "picard" (192.168.1.10) both able to mount the share
  • both think that it's RW (since I didn't give any -RO option)
  • "v-ger" cannot write to the filesystem
  • "picard" can write to the system

This is exactly how I'd expect NFS exports to work - it's how they work with Linux and Solaris (my only *nix experience up until installing FreeNAS).

It's just that the GUI in 11.1 has a rule preventing this legal export from happening.

#5 Updated by William Grzybowski over 1 year ago

  • Target version set to 11.3

Gavin Cameron wrote:

William Grzybowski wrote:

Whats the IP of "picard"?

Just because the export line shows up in 9.10 does not mean it works correctly. Since FreeBSD does not allow same share within the same overlapping network.

It could be an issue handling the hostname as well.

A workaround could be using the IP instead of hostname.

Thanks for picking this up.

The IP address for "picard" is 192.168.1.10... however I have to disagree with your comment that "FreeBSD does not allow same share within the same overlapping network." as the attached screenshot shows:

Thats because "picard" is a host, its not an overlapping network.

#6 Updated by William Grzybowski over 1 year ago

  • Status changed from 15 to Screened

#7 Avatar?id=14398&size=24x24 Updated by Kris Moore about 1 year ago

  • Status changed from Screened to Not Started

#8 Avatar?id=13649&size=24x24 Updated by Ben Gadd 12 months ago

  • Target version changed from 11.3 to Backlog

#9 Updated by William Grzybowski 12 months ago

  • Category changed from GUI (new) to Middleware

#10 Updated by William Grzybowski 12 months ago

  • Severity set to Medium

#11 Updated by William Grzybowski 11 months ago

  • Target version changed from Backlog to 11.2-RC2
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#12 Updated by William Grzybowski 11 months ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

Vladimir, can you handle this, please?

It seems nfs share plugin also needs to be fixed to accept hostnames again.

#13 Updated by Vladimir Vinogradenko 11 months ago

  • Status changed from Not Started to Done

#14 Updated by Dru Lavigne 11 months ago

  • Subject changed from GUI does not allow multiple NFS shares of the same dataset in v11.1 to Allow multiple NFS shares of the same dataset
  • Target version changed from 11.2-RC2 to 11.2-BETA1
  • Needs Doc changed from No to Yes

#15 Updated by Dru Lavigne 10 months ago

  • Status changed from Done to Ready for Testing

#17 Updated by Dru Lavigne 10 months ago

  • Status changed from Ready for Testing to Done
  • Needs QA changed from Yes to No

Also available in: Atom PDF