Create symbolic link mappings for SMB shares
You can create mappings of UNIX symbolic links for SMB shares. You can either create a relative symbolic link, which refers to the file or folder relative to its parent folder, or you can create an absolute symbolic link, which refers to the file or folder using an absolute path.
Widelinks are not accessible from Mac OS X clients if you use SMB 2.x. When a user attempts to connect to a share using widelinks from a Mac OS X client, the attempt fails. However, you can use widelinks with Mac OS X clients if you use SMB 1.
-
To create symbolic link mappings for SMB shares:
vserver cifs symlink create -vserver virtual_server_name -unix-path path -share-name share_name -cifs-path path [-cifs-server server_name] [-locality {local|free|widelink}] [-home-directory {true|false}]
-vserver
virtual_server_name
specifies the storage virtual machine (SVM) name.-unix-path
path
specifies the UNIX path. The UNIX path must begin with a slash (/
) and must end with a slash (/
).-share-name
share_name
specifies the name of the SMB share to map.-cifs-path
path
specifies the CIFS path. The CIFS path must begin with a slash (/
) and must end with a slash (/
).-cifs-server
server_name
specifies the CIFS server name. The CIFS server name can be specified as a DNS name (for example, mynetwork.cifs.server.com), IP address, or NetBIOS name. The NetBIOS name can be determined by using thevserver cifs show
command. If this optional parameter is not specified, the default value is the NetBIOS name of the local CIFS server.-locality
{local
|free
|widelink
} specifies whether to create a local link, a free link or a wide symbolic link. A local symbolic link maps to the local SMB share. A free symbolic link can map anywhere on the local SMB server. A wide symbolic link maps to any SMB share on the network. If you do not specify this optional parameter, the default value islocal
.-home-directory
{true
|false
} specifies whether the target share is a home directory. Even though this parameter is optional, you must set this parameter totrue
when the target share is configured as a home directory. The default isfalse
.
The following command creates a symbolic link mapping on the SVM named vs1. It has the UNIX path /src/
, the SMB share name “SOURCE”, the CIFS path /mycompany/source/
, and the CIFS server IP address 123.123.123.123, and it is a widelink.
cluster1::> vserver cifs symlink create -vserver vs1 -unix-path /src/ -share-name SOURCE -cifs-path "/mycompany/source/" -cifs-server 123.123.123.123 -locality widelink