Manage SMB using the CLI
This page provides procedures for setting up an SMB cluster over WEKA filesystems and managing the cluster itself, using the CLI.
Using the CLI, you can manage both SMB-W and legacy SMB:
Show the SMB cluster
Command: weka smb cluster
Use this command to view information about the SMB cluster managed by the WEKA system.
Show the SMB domain configuration
Command: weka smb domain
Use this command to view information about the SMB domain configuration.
Create the SMB cluster
Command: weka smb cluster create
Use the following command line to create a new SMB cluster to be managed by the WEKA system:
weka smb cluster create <netbios-name> <domain> <config-fs-name> [--domain-netbios-name domain-netbios-name] [--idmap-backend idmap-backend] [--default-domain-mapping-from-id default-domain-mapping-from-id] [--default-domain-mapping-to-id default-domain-mapping-to-id] [--joined-domain-mapping-from-id joined-domain-mapping-from-id] [--joined-domain-mapping-to-id joined-domain-mapping-to-id] [--encryption encryption] [--smb-conf-extra smb-conf-extra] [--container-ids container-ids]... [--smb-ips-pool smb-ips-pool]... [--smb-ips-range smb-ips-range]...
The weka smb cluster create
command creates an SMB-W cluster. To create a legacy SMB cluster, contact the Customer Success Team.
Parameters
Name | Value | Default |
---|---|---|
| NetBIOS name for the SMB cluster | |
| The Active Directory domain to join the SMB cluster to | |
| ||
| Domain NetBIOS name. | The first part of the |
| The ID mapping method to use.
Possible values: |
|
| The first ID of the range for the default AD ID mapping (for trusted domains that have no range defined). Not supported in SMB-W yet. | 4290000001 |
| The last ID of the range for the default AD ID mapping (for trusted domains that have no range defined). Not supported in SMB-W yet. | 4291000000 |
| The first ID of the range for the main AD ID mapping. | 0 |
| The last ID of the range for the main AD ID mapping. | 4290000000 |
| The global encryption policy to use:
SMB-W possible values: |
|
| Additional SMB configuration options. | |
| The container IDs of the containers with a frontend process to serve the SMB service. Minimum of 3 containers. | |
| A pool of virtual IPs, used as floating IPs for the SMB cluster to provide HA to clients. These IPs must be unique; do not assign these IPs to any host on the network. Format: comma-separated IP addresses. | |
| A range of virtual IPs, used as floating IPs for the SMB cluster to provide HA to clients. These IPs must be unique; do not assign these IPs to any host on the network.
Format: |
To enable HA through IP takeover, all IPs must reside on the same subnet.
The floating IPs configured but MUST NOT be in use by any other application/server in the subnet, including WEKA system management nodes, WEKA system IO nodes, or WEKA system NFS floating IPs. Setting a list of SMB floating IPs in all-cloud installations is impossible due to cloud provider network limitations. In this case, the SMB service must be accessed by using the primary addresses of the cluster nodes.
The --smb-ips
parameter must accept the virtual IPs that the SMB cluster exposes. To mount the SMB cluster in an high-availability manner, clients must be connected through one of the exposed virtual IPs, thereby ensuring that they automatically reconnect if one of the SMB containers fail.
If setting the global options to the SMB library is required, contact the Customer Success Team.
Example:
weka smb cluster create wekaSMB mydomain --container-ids 0,1,2,3,4 --smb-ips-pool 1.1.1.1,1.1.1.2 --smb-ips-range 1.1.1.3-5
In this example of a full command, an SMB cluster is configured over the WEKA system containers 0-4. The SMB cluster is called wekaSMB,
the domain name is called mydomain
and is directed to use virtual IPs 1.1.1.1 to 1.1.1.5.
Update the SMB cluster
Command: weka smb cluster update
Use the following command line to update an existing SMB cluster:
weka smb cluster update [--encryption encryption] [--smb-ips-pool smb-ips-pool]... [--smb-ips-range smb-ips-range]
Parameters
Name | Value |
---|---|
| The global encryption policy to use:
Possible values in SMB-W: |
| A pool of virtual IPs, used as floating IPs for the SMB cluster to provide HA to clients. These IPs must be unique; do not assign these IPs to any host on the network. Format: comma-separated IP addresses. |
| A range of public IPs is used as floating IPs to provide high availability for the SMB cluster to serve the SMB clients.
These IPs must be unique; do not assign these IPs to any host on the network.
Format: |
Check the status of SMB cluster readiness
Command: weka smb cluster status
The SMB cluster is comprised of three to eight SMB containers. Use this command to check the status of the SMB containers that are part of the SMB cluster. Once all the SMB containers are prepared and ready, it is possible to join an SMB cluster to an Active Directory domain.
Join an SMB cluster in Active Directory
Command: weka smb domain join
Use the following command line to join the SMB cluster to an Active Directory domain:
weka smb domain join <username> <password> [--server server] [--create-computer create-computer]
Ensure the AD servers are resolvable to all WEKA servers. This resolution enables the WEKA servers to join the AD domain.
Parameters
Name | Value | Default |
---|---|---|
| Name of an AD user with permission to add a server to the domain. | |
| The password of the AD user. This password is not retained or cached. | |
| Weka identifies the AD server automatically based on the AD name. You do not need to set the server name. In some cases, if required, specify the AD server. Not applicable for SMB-W yet. | The AD server is automatically identified based on the AD name. |
| The default AD organizational unit (OU) for the computer account is the Computers directory. You can define any OU to create the computer account in - that the joining account has permissions to - such as SMB Servers or Corporate Computers. Not applicable for SMB-W yet. | The Computers directory. |
To join an existing SMB cluster to another Active Directory domain, leave the current Active Directory using the following command line:
weka smb domain leave <username> <password>
On completion of this operation, it is possible to join the SMB cluster to another Active Directory domain.
Delete an SMB cluster
Command: weka smb cluster destroy
Use this command to destroy an SMB cluster managed by the Weka system.
Deleting an existing SMB cluster managed by the WEKA system does not delete the backend WEKA filesystems but removes the SMB share exposures of these filesystems.
Add or remove SMB cluster containers
Command: weka smb cluster containers add
Command: weka smb cluster containers remove
Use these commands to add or remove containers from the SMB cluster.
weka smb cluster containers add [--containers-id containers-id]...
weka smb cluster containers remove [--containers-id containers-id]...
This operation might take some time to complete. During that time, SMB IOs are stalled.
Parameters
Name | Value |
---|---|
| Container IDs of containers with a frontend process to serve the SMB service. Specify a comma-separated list with a minimum of 3 containers. |
Configure trusted domains
SMB-W does not yet support trusted domains.
List trusted domains
Command: weka smb cluster trusted-domains
Use this command to list all the configured trusted domains and their ID ranges.
Add trusted domains
Command: weka smb cluster trusted-domains add
Use the following command line to add an SMB trusted domain:
weka smb cluster trusted-domains add <domain-name> <from-id> <to-id>
Parameters
Name | Value |
---|---|
| The name of the domain to add. |
| The first ID of the range for the domain ID mapping. The range cannot overlap with other domains. |
| The last ID of the range for the domain ID mapping. The range cannot overlap with other domains |
Remove trusted domains
Command: weka smb cluster trusted-domains remove
Use the following command line to remove an SMB-trusted domain:
weka smb cluster trusted-domains remove <domain-id>
Parameters
Name | Value |
---|---|
| The internal ID of the domain to remove |
List SMB shares
Command: weka smb share
Use this command to list all existing SMB shares.
Add an SMB share
Command: weka smb share add
Use the following command line to add a new share to be exposed by SMB:
weka smb share add <share-name> <fs-name> [--description description] [--internal-path internal-path] [--file-create-mask file-create-mask] [--directory-create-mask directory-create-mask] [--obs-direct obs-direct] [--encryption encryption] [--read-only read-only] [--user-list-type user-list-type] [--users users]... [--allow-guest-access allow-guest-access] [--hidden hidden]
The mount mode for the SMB share is readcache
and cannot be modified.
Parameters
Name | Value | Default |
---|---|---|
| Valid name of the share to add. The share name must meet the following requirements:
SMB-W: you cannot create the same share name with different case insensitivity. | |
| Valid name of the filesystem to share. A filesystem with Required Authentication set to ON cannot be used for SMB share. | |
| The description of the share received in remote views. | |
| The internal valid path within the filesystem (relative to its root) which will be exposed | . |
| POSIX permissions for the file created through the SMB share. Numeric (octal) notation | 0744 |
| POSIX permissions for directories created through the SMB share. Numeric (octal) notation. SMB-W: the specified string must be greater or equal to 0600. | 0755 |
|
| |
| A special mount option to bypass the time-based policies. |
|
| The share encryption policy.
Possible value for SMB-W: |
|
| Sets the share as read-only. Users cannot create or modify files in this share.
Possible values: |
|
| The type of initial permissions list for
| |
| A list of users to use with the | Empty list |
| Allows connecting to the SMB service without a password. Permissions are as the |
|
| Sets the share as non-browsable. It will be accessible for mounting and IOs but not discoverable by SMB clients.
Possible values: |
|
If it is necessary to set a share with specific options to the SMB library, contact Weka support.
Example: The following is an example for adding users to a share mounted on a filesystem named "default":
weka smb share add rootShare default
weka smb share add internalShare default --internal-path some/dir --description "Exposed share"
In this example, the first SMB share added has the WEKA system share for default. The second SMB share has internal for default.
Update SMB shares
Command: weka smb share update
Use the following command line to update an existing share:
weka smb share update <share-id> [--encryption encryption] [--read-only read-only] [--allow-guest-access allow-guest-access] [--hidden hidden]
SMB-W does not yet support share updates.
Parameters
Name | Value |
---|---|
| A valid share ID to update. |
| The share encryption policy:
|
| Mount the SMB share as read-only.
Possible values: |
| Allow guest access.
Possible values: |
| Hide the SMB share.
Possible values: |
Control SMB share user-lists
SMB-W does not yet support share user-lists.
Command: weka smb share lists show
Use this command to view the various user-list settings.
Command: weka smb share lists add
Use the following command line to add users to a share user-list:
weka smb share lists add <share-id> <user-list-type> <--users users>...
Parameters
Name | Value |
---|---|
| The ID of the share to update. |
| The type of permissions list for |
| A comma-separated list of users to add to the |
Command: weka smb share lists remove
Use the following command line to remove users from a share user-list:
weka smb share lists remove <share-id> <user-list-type> <--users users>...
Parameters
Name | Value |
---|---|
| The ID of the share to be updated. |
| The type of permissions list for |
| A comma-separated list of users to remove from the |
Command: weka smb share lists reset
Use the following command line to remove all users from a share user-list:
weka smb share lists reset <share-id> <user-list-type>
Parameters
Name | Value |
---|---|
| The ID of the share to be updated |
| The type of permissions list to reset:
|
Remove SMB shares
Command: weka smb share remove
Use the following command line to remove a share exposed to SMB:
weka smb share remove <share-id>
Parameters
Name | Value |
---|---|
| The ID of the share to remove. |
Example: The following is an example of removing an SMB share defined as ID 1:
weka smb share remove 1
Control SMB access based on hosts' IP/name
It is possible to control which hosts are permitted to access the SMB service or share.
SMB-W does not yet support access based on hosts' IP/name.
Command: weka smb cluster host-access list
weka smb share host-access list
Use this command to view the various host access settings.
Command: weka smb cluster host-access add
weka smb share host-access add
Use the following command line to add a host to the allow/deny list (at either cluster level or share level):
weka smb cluster host-access add <mode> <--ips ips> <--hosts hosts>
weka smb share host-access add <share-id> <mode> <--ips ips> <--hosts hosts>
Parameters
Name | Value |
---|---|
| The ID of the share to update. Mandatory for the share-level command. |
| The access mode of the host.
Possible values: |
| Host IP addresses to allow or deny.
Must provide at least one of the |
| Host names to allow/deny.
Must provide at least one of the |
Command: weka smb cluster host-access remove
/ weka smb share host-access remove
Use the following command line to remove hosts from the allow or deny list (at either cluster level or share level):
weka smb cluster host-access remove <hosts>
weka smb share host-access remove <share-id> <hosts>
Parameters
Name | Value |
---|---|
| The ID of the share to be updated. Mandatory for the share-level command |
| The hosts to remove from the host-access list.
Space-separated list of hosts.
It must be the exact name as shown under the |
Command: weka smb cluster host-access reset
weka smb share host-access reset
Use the following command line to remove all containers from the allow or deny list (at either cluster level or share level):
weka smb cluster host-access reset <mode>
weka smb share host-access reset <share-id> <mode>
Parameters
Name | Value |
---|---|
| The ID of the share to update. Mandatory for the share-level command. |
| All hosts with this access mode will be removed from the list.
Possible values: |
Last updated