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

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

To modify shares:

  1. Log in to the Appliance Controller CLI.
  2. Enter:
  3. share change <share_type> (<share_name> | global) <option> [option, …] [nfshosts = host1 [ hostN ]]

    The parameters are:

    <share_type>

    The type of share, either nfs or smb.

    (<share_name> | global)

    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.

    <option>

    You must enter one share attribute to modify.

    [option, ...]

    (Optional) Options to define attributes of the share.

    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.

    The input for the export option is limited to 1024 characters.

    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.

    [nfshosts = host1 [ hostN ]]

    (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:

    • 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

    Example:

    nfhosts = host1.example.com host2.example.com host3.example.com

    See NFS Share Options.

  4. Repeat step 2 for each share to modify.
  5. 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

    • 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 of nfhosts, are replaced with the new options. To change the nfhosts 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.

    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