.

Shares

Shared storage is a storage system that is accessed by multiple users or computers. It stores all of the files in a centralized pool of storage and allows multiple users to access them at once. In the S1 system shared storage volumes are implemented through the use of Network Attached Storage (NAS).

Before you begin

  • To create a share storage, you must:
    • Have at least one network-attached storage (NAS) server.
    • You need to assign a filesystem to the volume you want to share.
  • A volume cannot have two different shares on the same path.

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=<app_inst> --volume=<vol_name> --share=<name> (--smb | --nfs) [-- path=<path>] [--browsable] [--allowedsubnets=<subnets>] [--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 Use the server message block (SMB) protocol to share the directory path.
or
--nfs Use the 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.
--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

  1. 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
    
  2. 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=<app_name> --volume=<vol_name> --share=<name> [--newname=<rename> (--smb | --nfs) --path=<path> (--browsable | --notbrowsable) --allowedsubnets=<subnets> (--readonlyaccess | --readwriteaccess)]

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=<rename> To rename the share, replace <rename> with a new name of your choice.
--smb To use server message block (SMB) for the share. <!– You can either use --smb or --nfs protocol 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.

Examples

  1. 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 add --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 shared

You can delete a share using the application shares delete command.

Usage

applications shares delete --application=<app_name> --volume=<vol_name> --shares=<name…>

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.

Examples

  1. 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
    
Last updated on 27 Nov 2022
Published on 25 Dec 2022