Creating SMB shares
Limitations
- The redundancy mode of an SMB share cannot be changed after its creation.
 
Prerequisites
- A clear understanding of the concept Storage policies.
 - The file storage cluster has joined the Active Directory domain, as described in Joining Active Directory.
 
To create an SMB share
Admin panel
- Go to Storage services > File storages > Shares and click Add share.
 - 
                                            
In the Add share window, specify a unique name, the share size in gibibytes, and redundancy parameters, such as a storage tier, failure domain, and redundancy mode. For users accessing exports, the share size will be the size of the file system.
 - Click Add.
 
After the share is created, you can proceed to create SMB exports.
Command-line interface
Use the following command:
vinfra service file-storage share create --size <size> [--node <node>] [--vdisk-count <vdisk-count>] [--stopped]
                                         --tier {0,1,2,3} (--replicas <norm[:min]> | --encoding <M>+<N>)
                                         --failure-domain {0,1,2,3,4} <name>
                                    --size <size>- Share size in bytes. Minimum size is 8G. Example: 100G, 1T.
 --node <node>- Node ID or hostname
 --vdisk-count <vdisk-count>- Number of virtual disks
 --stopped- Create a stopped share
 --tier {0,1,2,3}- Storage tier (default: 0)
 --replicas <norm>- 
                                            
Storage replication mapping in the format:
norm: the number of replicas to maintain (default: 1)
 --encoding <M>+<N>- 
                                            
Storage erasure encoding mapping in the format:
M: the number of data blocksN: the number of parity blocks
 --failure-domain {0,1,2,3,4}- Storage failure domain (default: 0)
 <name>- SMB share name
 
For example, to create the SMB share share1 on the node node001, run:
# vinfra service file-storage share create share1 --node node001 --size 512G --tier 0 --encoding 1+2 --failure-domain 1
The created share will appear in the vinfra service file-storage share list output:
# vinfra service file-storage share list +--------------------------------------+--------------------------------------+--------+--------------+---------+ | share_id | node_id | name | size | status | +--------------------------------------+--------------------------------------+--------+--------------+---------+ | 5652d4e4-a542-4c54-8f36-95290c951762 | 1f9803f9-2ab9-51cd-f010-208ed2424811 | share1 | 549755813888 | running | +--------------------------------------+--------------------------------------+--------+--------------+---------+