SMB Aliases
SMB aliases can be used to configure additional SMB shares on the system. Typically the SMB aliases are a sub-folder of the existing share but they can also represent the entire share with a different SMB name..
There are two options for managing additional SMB shares
- --smb-alias <SMB name>,<PATH within the share>
- --smb-alias-clear
Both options are also available using the share-update command.
Adding Aliases to an Existing Share
share-update is used when modifying an existing share and additional aliases can be added or removed using the options, smb-alias and smb-alias-clear. All SMB aliases, existing and new, must be included every time smb aliases are modified using share-update.
During a regular share-create command:
# share-create --name Prod --path /prod
A single SMB share is created, named Prod. When browsing the SMB end point, it displays a single share::
With the new option of --smb-alias, additional SMB aliases can be created. These aliases can be directly mounted by SMB clients.
Both of these are examples pointing back to the root of the share. Two additional SMB shares are created by specifying the option twice.
# share-create --name Prod --path /prod --smb-alias Production,/ --smb-alias ProdStuff,/
When browsing the SMB end point, it would look like this:
To add an SMB endpoint with spaces, enclose the information using " ". The same applies when using spaces in the path.
# share-create --name Prod --path /prod --smb-alias "My Prod Data,/"
A path can also be specified within the share itself. Note that all paths used must be pre-created otherwise the share-update command will fail.
The following command adds three SMB end points to a existing share, each pointing to a different sub-directory within the share.
Notice how all the paths start with / , this is a relative reference with / being the root of the share itself.
# share-update --name Prod --smb-alias Prod-Data,/data --smb-alias Binaries,/bin --smb-alias UserData,/space/userdata
Listing SMB Aliases
To list SMB aliases for a share, execute share-list --name <Share name> . If a share has an alias configured, there will be a new field called SMB Aliases with all the entries specified for that share. Each entry is separated with a space.
Removing Aliases
All SMB aliases must be specified when running share-update. To remove a single alias, run share-update with all the aliases except the one that needs to be removed.
To remove all aliases for a share, execute smb-alias-clear without options. Note that this will disconnect users that are using those SMB end-points and should be used carefully.
# share-update --share-name Prod --smb-alias-clear
Additional Notes
-
SMB alias names have to be unique in the system, the same SMB alias cannot be used for other shares.
-
SMB aliases are not replicated or created on remote sites when configuring a global file system. If it is desired to have the same SMB shares on other sites, they have to be added manually using the share-update command.
- A maximum of 100 SMB aliases can be created per share.
- Maximum SMB alias length is the same as the maximum length of a SMB share name.
- $ is indicating it is a hidden share. When creating an alias ending with a $ sign, then the share will not be visible when browsing the SMB end-point. The following example adds a hidden SMB share to the already existing list:
# share-update --name Prod --smb-alias Prod-Data,/data --smb-alias Binaries,/bin --smb-alias UserData,/space/userdata --smb-alias HiddenProd$,/
When viewing the share, the hidden SMB share is not visible, however, it can be mounted by specifying the name directly:
Administrative Group
When joined to Active Directory, members of the group Domain Admins are granted the same privilege as Administrator. This enables administrative users to be able to fix or override incorrectly set permissions of shares, folders and files.
Windows Previous Versions
Users can self-service data recovery from share-level snapshots using the Windows Previous Versions functionality. Users can right-click on a file or folder and restore or navigate to a previous point in time.
It is not recommended to restore the entire share using Windows Previous Versions as it will take longer than using the product GUI/CLI. For very large restore operations, it is recommended to use the product interface for faster recovery.