Creating a NAS Share
- The volume that you want to share must have a filesystem.
- A volume cannot have two different shares on the same path.
Any directory path of a volume can be shared through the Network File System (NFS) protocol or Server Message Block (SMB) protocol. To share a volume directory path, use the command:
applications shares add --application=<app_inst> --volume=<vol_name> --share=<name> (--smb | --nfs) [-- path=<path>] [--browsable] [--allowedsubnets=<subnets>] [--readonlyaccess]
Command options
-
--application=<app_inst>
: The application containing the volume. Replace<app_inst>
with the name of the application. -
--volume=<vol_name>
: The volume to which you want to add the share. Replace<vol_name>
with the name of the volume. -
--share=<name>
: The share name. Replace<name>
with a name of your choice. For SMB, you can access the share at\\<floating_ip_or_dns>\<share_name>
. For NFS, the share is exported at<floating_ip_or_dns>:/shares/<share_name>
. -
--smb
or--nfs
: Use the Server Message Block (SMB) or Network File System (NFS) protocol, respectively, to share the directory path. -
--path=<path>
: The directory path (in the volume) you want to share. If you do not specify a path, the root directory of the volume is shared. -
--browsable
: Enables directory browsing. Relevant only when using the SMB protocol. Allows clients to browse the share directory path. -
--allowedsubnets=<subnets>
: Limits access to only specified IP addresses. 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
. This parameter is optional. If the list is empty or contains a wildcard, any IP can access the shared directory path. -
--readonlyaccess
Creates the share as read-only. If this option is not specified, all clients will have read and write permissions.
No Comments