Managing SMB shares
Once an SMB share is created, it starts automatically. To extend its size, you must first stop the share. You can also modify the redundancy scheme or delete the share when it is stopped.
Limitations
- You cannot shrink shares.
- The size of a share cannot be changed while it is running.
- You cannot change the redundancy type of a share.
- Running shares, or shares with exports, cannot be deleted.
Prerequisites
- SMB shares are created, as described in Creating SMB shares.
To stop an SMB share
Admin panel
- Go to the Storage services > File storage > Shares tab.
- Click the line with a running share, and then click Stop on the right pane.
Stopping a share immediately terminates all active sessions. Users currently connected to the share will lose access.
Command-line interface
Use the following command:
vinfra service file-storage share stop <share>
<share>- Share ID or name
For example, to stop the share share1, run:
# vinfra service file-storage share stop share1
To restart an SMB share
Admin panel
- Go to the Storage services > File storage > Shares tab.
- Click the line with a stopped share, and then click Run on the right pane.
Command-line interface
Use the following command:
vinfra service file-storage share start <share>
<share>- Share ID or name
For example, to start the share share1, run:
# vinfra service file-storage share start share1
To reconfigure an SMB share
Admin panel
- Go to the Storage services > File storage > Shares tab.
- If you want to change the share size, stop the share first. To do it, click the line with the share, and then click Stop on the right pane.
- To change the share parameters, click Edit on the right pane.
- In the Edit window, change the required parameters, and then click Save.
Command-line interface
Use the following command:
vinfra service file-storage share set [--name <name>] [--size <size>] [--tier {0,1,2,3}]
[--replicas <norm[:min]> | --encoding <M>+<N>] [--failure-domain {0,1,2,3,4}] <share>
--name <name>- New share name
--size <size>- New share size in bytes. Must be larger than the current size. Example: 100G, 1T.
--tier {0,1,2,3}- Storage tier
--encoding <M>+<N>-
Storage erasure encoding mapping in the format:
M: number of data blocksN: number of parity blocks
To see a full list of available redundancy schemes, run the
vinfra cluster storage-redundanciescommand. --failure-domain {0,1,2,3,4}- Storage failure domain
--replicas <norm>-
Storage replication mapping in the format:
norm: the number of replicas to maintain
<share>- Share ID or name
For example, to increase the size of the share share1 to 200 G, run:
# vinfra service file-storage share set share1 --size 200GiB
To delete an SMB share
Admin panel
- Go to the Storage services > File storage > Shares tab.
- If you want to delete a running share, stop the share first. To do it, click the line with the share, and then click Stop on the right pane.
- If you want to delete a share with exports, delete them first. To do it, click the the share name, and then delete all the exports on the share screen.
- Click the line with a share to remove, and then click Delete on the right pane.
- Click Delete in the confirmation window.
Command-line interface
Use the following command:
vinfra service file-storage share delete <share>
<share>- Share ID or name
For example, to delete the share share1, run:
# vinfra service file-storage share delete share1