Modify Shares
After adding SMB or NFS shares to StorNext NAS, you can modify the share settings. The same settings accepted by the share add
command can be modified with the share change
command.
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.
Note: For a list of all the Appliance Controller commands, see the Command Index.
To modify shares:
- Log in to the Appliance Controller CLI.
- Enter:
- Separate multiple options by a comma.
- For options that can have multiple values, separate the values by a space.
- You must enter
nfshosts =
. - Separate multiple hosts with spaces, not commas.
- List hosts in one of the following ways:
- Host name or IP address
- Wildcards
- IP networks or netgroups
- Repeat step 2 for each share to modify.
- When you issue the
share change smb
command, all previous options are replaced with the new options. - When you issue the
share change nfs
command, all previous options, with the exception ofnfhosts
, are replaced with the new options. To change thenfhosts
option, you must specify that option. - To append additional options to the share, you need to enter the share's current options along with the new options.
share change <share_type> (<share_name> | global) <option> [option, …] [nfshosts = host1 [ hostN ]]
The parameters are:
|
The type of share, either |
|
The name assigned to a specific share. The input is limited to 64 characters. If you are modifying options in the global section of the smb.conf file, see SMB Share Options. |
|
You must enter one share attribute to modify. |
|
(Optional) Options to define attributes of the share. When entering options, use the following conventions: The input for the Examples: named streams = yes guest ok = yes users = john sue mary In the above example, the first option contains 14 characters and the second option contains 21 characters. Both options are well within the 1024-character limit. See also SMB Share Options. |
|
(NFS shares only) Host(s) allowed access to an NFS share. If no host(s) is provided, any host may access the NFS share. When entering options, use the following conventions: Example: nfhosts = host1.example.com host2.example.com host3.example.com See NFS Share Options. |
Example (Change the create mask and write list options of an SMB share):
> share change smb myshare create mask = 600, write list = @smb-rw
Example (Change an NFS share to read only and restrict root privileges to remote root users):
> share change nfs mynfsshare ro,root_squash
Considerations
Example:
If the current myshare settings were:
myshare | smb | /stornext/snfs/share1 | write list = james doris, admin users = sysadmin, public = no, writable = yes |
Enter a the command to add "delete readonly = yes, acl check permissions = no" :
> share change smb myshare write list = james doris, admin users = sysadmin, public = no, writable = yes, delete readonly = yes, acl check permissions = no