Shares
You can create file Server Message Block (SMB) or Network File System (NFS) file shares on the StorONE system. File shares allow multiple users to access files simultaneously on a network attached storage (NAS) server.
Before you begin
- To create a share storage, you must:
- Have at least one network-attached storage (NAS) server.
- You must add a filesystem to the volume you want to share.
- A volume cannot have two different shares on the same path.
- A volume can be shared via NFS or SMB, but not both.
Creating a share
The S1 system allow you to share any directory path of a volume through the Network File System (NFS) protocol or Server Message Block (SMB) protocol. To share a volume directory path, use the applications shares add
command.
Usage
applications shares add --application=<name> --volume=<name> --share=<name> --smb|--nfs [--path=<path>] [--browsable] [--allowedSubnets=<subnets...>] [--recycleBin] [--readonlyAccess]
Options
Required
Options and arguments |
Description |
--application=<app_inst> |
Specify the name of the app instance. Replace <app_inst> with the application instance of the volume |
--volume=<vol_name> |
Specify the name of the volume to which you want to add the share. Replace <vol_name> with the name of the volume. |
--share=<name> |
Specify a name for the share. Replace <name> with a name of your choice. |
--smb | --nfs |
Use the server message block (SMB) or network file system (NFS) protocol to share the directory path. |
Optional
Options and arguments |
Description |
--path=<path> |
To specify the directory path (in the volume) you want to share. If you don't specify a path, the root directory becomes the share directory path. |
--browsable |
To enable directory browsing; relevant only when using SMB protocol. Allow clients to browse the share directory path. |
--allowedsubnets=<subnets> |
To limit access. Only specified IP addresses can access the share. Replace <subnet> with a list of IP/mask addresses separated by semi-colon. For example, to allow access to the share from IP addresses 192.168.20.x and IP addresses 10.1.x.x, set --allowedsubnets 192.168.20.0/255.255.255.0;10.1.0.0/255.25.0.0 . The --allowedsubnets option is optional. Notice: if the list is empty or it contains a wildcard, any IP can gain access to the shared directory path. |
--recycleBin |
To add support for a Recycle Bin |
--readonlyaccess |
To limit access to the shared directory path, clients can be granted read-only permission by using the --readonlyaccess option. If this option is not specified, all clients will have read and write permission. |
Examples
- To add an SMB share
examples
with the following parameters
- Application instance:
Ateam
- Volume name:
sales
- Path on volume sales:
\usr\foo
- Make the share browsable run:
applications shares add --application Ateam --volume sales --share examples --smb --path \usr\foo --browsable
- To add an NFS share and name
RH
with the following parameters
- Application instance:
Oprob
- Volume name:
numth
- Path on volume sales:
/home/hypo/Documents/results
- Only IP addresses
10.0.0.x
and 192.168.x.x
allowed. (where x can be any number between 0-255).
- Clients granted read-only permission. run:
applications shares add --application Oprob --volume numth --share RH --nfs --path /home/hypo/Documents/results --allowsubnets 10.0.0.0/255.255.255.0;192.168.0.0/255.255.0.0
Editing a share
You can edit a share using the applications shares edit
command.
Usage
applications shares edit --application=<name> --volume=<name> --share=<name> [--newName=<name> --smb|--nfs --path=<path> --browsable|--notBrowsable --allowedSubnets=<subnets...> --readonlyAccess|--readwriteAccess --recycleBin|--noRecycleBin]
Options
Required
Options and arguments |
Description |
--application=<app_name> |
Specify the app instance of the volume. Replace <app_name> with the name of the application instance. |
--volume=<vol_name> |
Specify the name of the volume where the share resides. Replace <vol_name> with the name of the volume. |
--share=<name> |
Specify the name of the share to edit. Replace <name> with the name of the share. |
Optional
Options and arguments |
Description |
--newname=<name> |
To rename the share, replace <name> with a new name of your choice. |
--smb |
To use server message block (SMB) for the share. |
--nfs |
To use network file system (NFS) protocol for the share. |
--path=<path> |
To edit the path of the share. |
--browsable |
To enable directory browsing; relevant only when using SMB protocol. Allow clients to browse the share directory path. |
--notbrowsable |
To disable directory browsing, relevant only when using SMB protocol. Block clients from browsing the share directory path. |
--allowedsubnets=<subnets> |
To limit access. Only specified IP addresses can access the share. Replace <subnet> with a list of IP/mask addresses separated by semi-colon. For example, to allow access to the share from IP addresses 192.168.20.x and IP addresses 10.1.x.x, set --allowedsubnets 192.168.20.0/255.255.255.0;10.1.0.0/255.25.0.0 . The --allowedsubnets option is optional. Notice: if the list is empty or it contains a wildcard, any IP can gain access to the shared directory path. |
--readonlyaccess |
To restrict clients to read-only access to the share. |
--readwriteaccess |
To grant read and write access to the share. |
--recycleBin |
To enable Recycle Bin support. |
--noRecycleBin |
To disable Recycle Bin Support. |
Examples
- Assuming we have a share with the following configurations
- Name of the share:
examples
- Network protocol:
SMB
- Application instance:
Ateam
- Volume name:
sales
- Path (on the volume sales):
/home/results/Documents/marketing
- Browsing permission: allowed for all clients
- Clients have only read-only permission.
To modify the network protocol to NFS, grant clients with read and write privileges, and rename the share to results
; run:
applications shares edit --application Ateam --volume sales --share examples --newname `results` --nfs --readwriteaccess
Notice: After replacing the SMB protocol with the NFS protocol, you won't be able to browse the share.
Delete a share
You can delete a share using the application shares delete
command.
Usage
applications shares delete --application=<name> --volume=<name> --shares=<name...> [--force]
Options
Options and arguments |
Description |
--application=<app_name> |
Specify the app instance of the consistency group or the volume. Replace <app_name> with the application instance name. |
--volume=<vol_name> |
Specify the volume. Replace <vol_name> with the name of the volume. |
--shares=<name…> |
List the names of the shares that you want to delete. Replace <name…> with a list of shares separated by a space. |
--force |
Don't ask for approval when deleting |
Examples
- To delete shares
sales
and prospects
on volume HR
mapped to application instance workers
; run:
applications shares delete --application worker --volume HR --share sales prospects
No Comments