Creating SMB exports
To create SMB exports, follow these steps:
- Create the root export.
- Mount the root export, as described in the Storage User Guide.
- Create user exports in the mounted root export.
- Mount these user exports the same way you have mounted the root export.
Prerequisites
- SMB shares are created, as described in Creating SMB shares.
To create the root export
Admin panel
- On the Storage services > File storage > Shares screen, click the name of the desired share. This will open the share screen.
- On the share screen, click Add export.
-
In the Add export window, specify a unique export name and / as its path. For security reasons, it is recommended to deselect the Browseable setting for the root export.
The root export will be shown in the export list.
- Click Add.
This will create a directory with a default path that designates the export location inside the share. This path is automatically generated based on the share name and used (alongside the node's virtual IP address) to mount the export.
Do not give users access to the root export.
Command-line interface
Use the following command:
vinfra service file-storage export create [--writable | --read-only] [--public | --private] [--case-sensitive | --case-insensitive] [--mangled-names | --unmangled-names] [--browsable | --unbrowsable] --share <share> [--path <path>] <name>
--writable
- Writable export (default)
--read-only
- Read-only export
--public
- Public export (default without Active Directory)
--private
- Private export (default with Active Directory)
--case-sensitive
- Export with case-sensitive file names
--case-insensitive
- Export with case-insensitive file names (default)
--mangled-names
- Export with file names mangling (default)
--unmangled-names
- Export without file names mangling
--browsable
- Browsable export (default)
--unbrowsable
- Unbrowsable export
--share <share>
- Share ID or name
--path <path>
- Export path (default: /)
<name>
- Export name
For example, to create the root export for the share share1
, run:
# vinfra service file-storage export create root --private --unbrowsable
The created root export will appear in the vinfra service file-storage export list
output:
# vinfra service file-storage export list --share share1 +--------------------------------------+--------------------------------------+------+ | export_id | share_id | name | +--------------------------------------+--------------------------------------+------+ | b60a6d72-af19-456a-9795-b9d1b7e95264 | 5652d4e4-a542-4c54-8f36-95290c951762 | root | +--------------------------------------+--------------------------------------+------+
To create user exports
Admin panel
- In the mounted root export, create a subdirectory for a user export, for example, export1.
- On the share screen, click Add export.
-
In the Add export window, specify the following:
- Enter a unique export name and set the path to /export1.
-
Change the access control settings:
- Enable Public access to allow all users to connect without authentication.
- Enable Browseable so that the shared folder appears in the network browser.
- Click Add.
The user export will appear in the export list.
Command-line interface
Use the following command:
vinfra service file-storage export create [--writable | --read-only] [--public | --private] [--case-sensitive | --case-insensitive] [--mangled-names | --unmangled-names] [--browsable | --unbrowsable] --share <share> [--path <path>] <name>
--writable
- Writable export (default)
--read-only
- Read-only export
--public
- Public export (default without Active Directory)
--private
- Private export (default with Active Directory)
--case-sensitive
- Export with case-sensitive file names
--case-insensitive
- Export with case-insensitive file names (default)
--mangled-names
- Export with file names mangling (default)
--unmangled-names
- Export without file names mangling
--browsable
- Browsable export (default)
--unbrowsable
- Unbrowsable export
--share <share>
- Share ID or name
--path <path>
- Export path (default: /)
<name>
- Export name
For example, to create the user export export1
at /export1, run:
# vinfra service file-storage export create export1 --share share1 --path /export1 --private
The created SMB export will appear in the vinfra service file-storage export list
output:
# vinfra service file-storage export list --share share1 ++--------------------------------------+--------------------------------------+---------+ | export_id | share_id | name | +--------------------------------------+--------------------------------------+---------+ | a8d9b3cf-ea1c-4d20-9672-5762edbd10a5 | 868301ba-d5d5-4e99-8363-fc0bdf45ce8d | export1 | | b60a6d72-af19-456a-9795-b9d1b7e95264 | 5652d4e4-a542-4c54-8f36-95290c951762 | root | +--------------------------------------+--------------------------------------+---------+