Open topic with navigation

Disconnected: You’re looking at a local copy of the Appliance Controller Documentation Center. The most current version is online at www.quantum.com/accdocs.

# NFS Share Options

You can include NFS share options with the `share add`, `share change`, and`share create` commands. StorNext NAS supports all NFS share options.

For a full list of options, along with how best to use them for your environment, see the exports man page for your specific operating system.

Note: For a list of all the Appliance Controller commands, see the Command Index.

Note: Enable SNFS file locking for NFS shares on NAS clusters.

NFS Option Conventions

When entering options, use the following conventions:

- Separate multiple options by a comma.
- For options that can have multiple values, separate the values by a space.

Example (Change an NFS share to read only, and restrict root privileges to remote root users). Enter:

> `share change nfs mynfsshare ro,root_squash`

Example (Define multiple NFS hosts for the share). Enter:

> `share change nfs mynfsshare nfshosts = host1.example.com host2.example.com`

Additional Considerations
NFS requirement for Managed File Systems

NFS shares on managed filesystems require `dmnfsthreads` to be set for shares that are StorNext Storage Manager relation points. If you see an error message similar to like "hostname:filesystem server not responding" on your NFS clients, "dmnfsthreads=" should be added to the StorNext filesystem mount option in the `/etc/fstab` file on all NAS servers. If you have further questions about cvfs mount options, see `man mount_cvfs` from the command line of the system.

Default Options

If you do not provide `ro/rw` or `async/sync` options for NFS shares, default values are set to the following:

- read write (`rw`)
- `sync`

nfshosts Share Option

Use the `nfshosts` share option to list clients or networks that are authorized to mount the NFS filesystem. Keep the following in mind when using this option:

- StorNext NAS does not support the use of commas (,) to separate the `nfshosts` share option. If you are defining multiple NFS hosts for a share, separate each host with a space.

Example:

`nfshosts = host1.example.com host2.example.com`

- If you do not define clients or networks for the `nfshosts` option, then all hosts will be able to mount the NFS share.

See Limit NFS Share Access for examples.

Caution

- The Appliance Controller manages the smb.conf and /etc/exports files for StorNext NAS. Any edits you make directly to either of these files are lost when you restart the Appliance Controller, or when you make a change using any of the `share` commands.

- When you make a change to an SMB share, its existing connection might be impacted and depending on the SMB client, it is possible to disconnect from that share.

Limit NFS Share Access

You can use NFS share options to limit share access by hostname, IP Network, or netgroup. The following scenarios present options to limit NFS share access.

Note: For the following examples, the same options are specified for each host.

Example (Scenario 1) Export myshare with the default options of rw and sync without restricting access to any hosts:

> `share add nfs myshare /stornext/snfs/myshare`

Output (Line written to the `/etc/exports` file):

/stornext/snfs/myshare *(rw,sync)

Example (Scenario 2) Add an NFS share as read only (ro) and secure for NFS host:

> `share add nfs myshare /stornext/snfs/myshare ro,secure,nfshosts = eng.example.com`

Output (Line written to the `/etc/exports` file):

/stornext/snfs/myshare eng.example.com(ro,secure)

Example (Scenario 3) Limit access to the myhost.example.com, myhost2.example.com, and 10.20.30.123 hosts:

> `share add nfs myshare /stornext/snfs/myshare nfshosts = myhost.example.com myhost2.example.com 10.20.30.123`

Output (Line written to the `/etc/exports` file):

/stornext/snfs/myshare myhost.example.com(rw,sync) myhost2.example.com(rw,sync) 10.20.30.123(rw,sync)

Apply Different Export Options to Different Hosts

You can apply different export options to different hosts on the same directory. The following example shows how to configure read-only access to everyone in the domain example.com, but limits read-write access to just two IP addresses:

Example:

1. Create a share:

> `share add nfs nfs-ro /stornext/snfs1/nfs2 ro,nfshosts=*.example.com`

Output:

Adding share to existing directory

Share nfs-ro successfully added

2. Configure read-write access to the two IP addresses:

> `share add nfs nfs-rw /stornext/snfs1/nfs2 rw,nfshosts=192.168.1.2 192.168.1.3`

Output:

Adding share to existing directory

Share nfs-rw successfully added

3. Verify the settings set on the share using the `share show` command:

> `share show`

Output:

     2 shares:1: nfs-ro | nfs | /stornext/snfs1/nfs2 | ro,sync,fsid=8000,nfshosts=*.example.com2: nfs-rw | nfs | /stornext/snfs1/nfs2 | rw,sync,fsid=8000,nfshosts=192.168.1.2 192.168.1.3

4. The command in this example adds an entry to the `/etc/exports` file. For this example, the following is the information added to the file:

/stornext/snfs1/nfs2 *.example.com(ro,sync,fsid=8000)

/stornext/snfs1/nfs2 192.168.1.2(rw,sync,fsid=8000) 192.168.1.3(rw,sync,fsid=8000)

6-68456-07_RevA | Initial publication date: Friday, December 22, 2017 | Last updated on Monday, January 12, 2026.

Open topic with navigation