Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Managing SMB

The Content Software for File system has a number of CLI commands for setting up an SMB cluster over Content Software for File filesystems. Used for managing the cluster itself, they are all located under theweka smb cluster command. They define what Content Software for File hosts will participate in the SMB cluster, and what (if any) public IPs will be exposed by the SMB cluster.

Showing an SMB cluster using the CLI

Command

weka smb cluster

Use this command to view information about the SMB cluster managed by the Content Software for File system.

Showing an SMB domain configuration using the CLI

Command

weka smb domain

Use this command to view information about the SMB domain configuration.

Creating an SMB cluster using the CLI

Commandweka smb cluster create

Use the following command line to create a new SMB cluster to be managed by the Content Software for File system:

weka smb cluster create <name> <domain> [--samba-hosts samba-hosts]... [--smb-ips-pool smb-ips-pool]... [--smb-ips-range smb-ips-range]...
Parameters
NameTypeValueLimitationsMandatoryDefault
nameStringNetBIOS name for the SMB clusterMust be a valid name (ASCII)Yes
domainStringThe domain which the SMB cluster is to joinMust be a valid name (ASCII)Yes
samba-hostsComma-separated stringsList of 3-8 Content Software for File system hosts to participate in the SMB cluster, based on the host IDs in Content Software for FileMust be valid host IDsYes
smb-ips-poolComma-separated IP addressesThe public IPs used as floating IPs for the SMB cluster to serve the SMB over and thereby provide HA; should not be assigned to any host on the networkMust be valid IP addressesNo
smb-ips-rangeIP address rangeThe public IPs used as floating IPs for the SMB cluster to serve the SMB over and thereby provide HA; should not be assigned to any host on the networkFormat: A.B.C.D-E for example, 10.10.0.1-100No
domain-netbios-nameStringDomain NetBIOS nameMust be a valid name (ASCII)NoFirst part of domain parameter
NoteContent Software for File
  • All IPs must reside on the same subnet, in order to enable HA through IP takeover.
  • The IPs must be configured but MUST NOT be in use by any other application/host in the subnet, including Content Software for File system management nodes, Content Software for File system IO nodes, or Content Software for File system NFS floating IPs. In AWS environments, this is not supported and these IPs should not be provided.
  • The --smb-ips parameter is supposed to accept the public IPs that the SMB cluster will expose. To mount the SMB cluster in an HA manner, they should be mounted via one of the exposed public IPs, thereby ensuring that they will not lose connection if one of the SMB hosts fails.
  • If it is necessary to set global options to the SMB library, contact customer support.
For example:
weka smb cluster create wekaSMB mydomain --samba-hosts 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 Content Software for File system hosts 0-4. The SMB cluster is called wekaSMB, the domain name is called mydomain, and is directed to use public IPs 1.1.1.1 to 1.1.1.5.

Checking status of SMB host readiness using the CLI

Command

weka smb cluster status

Use this command to check the status of the hosts which are part of the SMB cluster. Once all host are prepared and ready, it is possible to join an SMB cluster to an Active Directory.

Joining an SMB cluster to an Active Directory using the CLI

Commandweka smb domain join

Use the following command line to join an SMB domain to an Active Directory:

weka smb domain join <username> <password>
Parameters
NameTypeValueLimitationMandatoryDefault
usernameStringName of a user with permissions to add a machine to the domainMust be a valid name (ASCII)Yes
passwordStringThe password of the userMust be a valid password (ASCII)Yes

In order to join another Active Directory to the current SMB cluster configuration, it is necessary to leave the current Active Directory. This is performed using the following command line:

weka smb domain leave <username> <password>

On completion of this operation, it is possible to join another Active Directory to the SMB cluster.

NoteTo configure a new SMB cluster, the current SMB cluster has to be deleted.

Deleting an SMB cluster using the CLI

Command

weka smb cluster destroy

Use this command to destroy an SMB cluster managed by the Content Software for File system. Deleting an existing SMB cluster managed by the system does not delete the backend Content Software for File filesystems, but removes the SMB share exposures of these filesystems.

NoteEditing an existing cluster is not supported. Consequently, to change an SMB cluster configuration, the cluster has to be deleted and recreated.

Configuring trusted domains using the CLI

How to configure trusted domains using the CLI.

Listing trusted domains using the CLI

Commandweka smb cluster trusted-domains

Use this command to list all the configured trusted domains and their ID ranges.

Adding trusted domains using the CLI

Commandweka 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
NameTypeValueLimitationsMandatoryDefault
domain-nameStringThe name of the domain being addedMust be a valid name (ASCII)Yes
from-idNumberThe first ID of the range for the domain ID mappingThe range cannot overlap with other domainsYes
to-idNumberThe last ID of the range for the domain ID mappingThe range cannot overlap with other domainsYes

Removing trusted domains using the CLI

Commandweka 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
NameTypeValueLimitationsMandatoryDefault
domain-idNumberThe internal ID of the domain to removeYes

Listing SMB shares using the CLI

Command

weka smb share

Use this command to list all existing SMB shares.

Adding SMB shares using the CLI

Command

weka smb share add

Use the following command line to add a new share to be exposed to SMB:

smb share add <share-name> <fs-name> [--description description] [--internal-path internal-path] [file-create-mask] [directory-create-mask]
Parameters
NameTypeValueLimitationsMandatoryDefault
share-nameStringName of the share being addedMust be a valid name (ASCII)Yes
fs-nameStringName of the filesystem to shareMust be a valid name. A filesystem set with required authentication cannot be used for SMB share.Yes
descriptionStringDescription of what the share will receive when viewed remotelyMust be a valid stringNoNo description
internal-pathStringThe internal path within the filesystem (relative to its root) which will be exposedMust be a valid pathNo
file-create-maskStringPOSIX permissions for the file created through the SMB shareNumeric (octal) notationNo0744
directory-create-maskStringPOSIX permissions for directories created through the SMB shareNumeric (octal) notationNo0755
NoteIf it is necessary to set share specific options to the SMB library, contact customer support.
For 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 Content Software for File system share for default. The second SMB share has internal for default.

Updating SMB shares using the CLI

Command

weka smb share update

Use the following command line to update an existing share:

weka smb share update <share-id> [--encryption encryption]
Parameters
NameTypeValueLimitationsMandatoryDefault
share-idNumberThe ID of the share to be updatedMust be a valid share IDYes
encryptionStringThe share encryption policy. desired - turns on data encryption for this share for clients that support encryption if negotiation has been enabled globally. required - enforces encryption for the shares. Clients that do not support encryption will be denied access to the share. If the global option is set to disabled access will be denied to these shares for all clientscluster_default desired or requiredNo

Controlling SMB shares users lists using the CLI

How to control SMB shares users lists using the CLI.

Showing SMB share user lists using the CLI

Command

weka smb share lists show

Use this command to view the various user-list settings:

Adding SMB share user to list using the CLI

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
NameTypeValueLimitationsMandatoryDefault
share-idNumberThe ID of the share to be updatedMust be a valid share IDYes
user-list-typeStringThe type of permissions list for users

read_only - list of users that will not be given write access to the share, regardless of the read-only setting. read_write - list of users that will be given write access to the share, regardless of the read-only setting. valid - list of users that are allowed to log-in to this share SMB service (empty list - all users are allowed) invalid - list of users that are not allowed to log-in to this share SMB service

Yes
usersA comma-separated list of stringsA list of users to add to the user-list-type list. Can use the @ notation to allow groups of users, for example root, Jack, @domain\adminsUp to 8 users/groups for all lists combined per shareYes

Removing SMB share user from lists using the CLI

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
NameTypeValueLimitationsMandatoryDefault
share-idNumberThe ID of the share to be updatedMust be a valid share IDYes
user-list-typeStringThe type of permissions list for users read_only - list of users that will not be given write access to the share, regardless of the read-only setting. read_write - list of users that will be given write access to the share, regardless of the read-only setting. valid - list of users that are allowed to log-in to this share SMB service (empty list - all users are allowed) invalid - list of users that are not allowed to login to this share SMB serviceYes
usersA commaseparated list of StringsA list of users to remove from the user-list-type list. Can use the @ notation to allow groups of users, for example, root, Jack, @domain\adminsUp to 8 users/groups for all lists combined per shareYes

Resetting SMB share user lists using the CLI

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
NameTypeValueLimitationsMandatoryDefault
share-idNumberThe ID of the share to be updatedMust be a valid share IDYes
user-list-typeStringThe type of permissions list to reset read_only - list of users that will not be given write access to the share, regardless of the read-only setting. read_write - list of users that will be given write access to the share, regardless of the read-only setting. valid - list of users that are allowed to log-in to this share SMB service (empty list - all users are allowed) invalid - list of users that are not allowed to log-in to this share SMB serviceYes

Removing SMB shares using the CLI

Command

weka smb share remove

Use the following command line to remove a share exposed to SMB:

weka smb share remove <share-id>
Parameters
NameTypeValueLimitationMandatoryDefault
share-idStringThe ID of the share to be removedMust be a valid share IDYes
For example: The following is an example for removing an SMB share defined as ID 1:
weka smb share remove 1