Configuring character mapping for SMB file name translation on volumes

NFS clients can create file names that contain characters that are not valid for SMB clients and certain Windows applications. You can configure character mapping for file name translation on volumes to allow SMB clients to access files with NFS names that would otherwise not be valid.

About this task

When files created by NFS clients are accessed by SMB clients, ONTAP looks at the name of the file. If the name is not a valid SMB file name (for example, if it has an embedded colon : character), ONTAP returns the 8.3 file name that is maintained for each file. However, this causes problems for applications that encode important information into long file names.

Therefore, if you are sharing a file between clients on different operating systems, you should use characters in the file names that are valid in both operating systems.

However, if you have NFS clients that create file names containing characters that are not valid file names for SMB clients, you can define a map that converts the invalid NFS characters into Unicode characters that both SMB and certain Windows applications accept. For example, this functionality supports the CATIA MCAD and Mathematica applications as well as other applications that have this requirement.

You can configure character mapping on a volume-by-volume basis.

You must keep the following in mind when configuring character mapping on a volume:


Configure character mapping: vserver cifs character-mapping create -vserver vserver_name -volume volume_name -mapping mapping_text, ...

The mapping consists of a list of source-target character pairs separated by :. The characters are Unicode characters entered using hexadecimal digits. For example: 3C:E03C.

The first value of each mapping_text pair that is separated by a colon is the hexadecimal value of the NFS character you want to translate, and the second value is the Unicode value that SMB uses. The mapping pairs must be unique (a one-to-one mapping should exist).

  • Source mapping

    The following table shows the permissible Unicode character set for source mapping:

    Unicode character Printed character Description
    0x01-0x19 Not applicable Non-printing control characters
    0x5C \ Backslash
    0x3A : Colon
    0x2A * Asterisk
    0x3F ? Question mark
    0x22 " Quotation mark
    0x3C < Less than
    0x3E > Greater than
    0x7C | Vertical line
    0xB1 ± Plus-minus sign
  • Target mapping

    You can specify target characters in the Private Use Area of Unicode in the following range: U+E0000...U+F8FF.


The following command creates a character mapping for a volume named data on storage virtual machine (SVM) vs1:

cluster1::> vserver cifs character-mapping create -volume data -mapping 3c:e17c,3e:f17d,2a:f745
cluster1::> vserver cifs character-mapping show

Vserver         Volume Name  Character Mapping
--------------  -----------  ------------------------------------------
vs1             data         3c:e17c, 3e:f17d, 2a:f745