JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Managing SMB File Sharing and Windows Interoperability in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information


1.  Sharing Files Between Windows and Oracle Solaris Systems

The SMB File Sharing Environment

SMB Server

SMB Client

Identity Mapping Service

Managing SMB Configuration Properties

Configuring the SMB Server - Process Overview

Utilities and Files Associated With the SMB Server and Client

SMB Utilities

mount_smbfs Command

sharectl Command

share Command

smbadm Command

smbstat Command

umount_smbfs Command

unshare Command

zfs Command

SMB Service Daemon

SMB Files

/etc/auto_direct File

/etc/dfs/sharetab File

/etc/smbautohome File

Authentication, Directory, Naming, and Time Services

SMB Shares

SMB Share Properties

SMB Share Access Control

Host-Based Access Control to SMB Shares

Access Control Lists on SMB Shares

SMB Autohome Shares

SMB Autohome Entries

SMB Autohome Map Entry Format

SMB Autohome Map Key Substitution

Wildcard Rule

nsswitch Map

Local SMB Groups

Client-Side Caching for Offline Files

SMB Share Execution Properties

SMB Support for the Distributed File System

SMB Support for SMB Printing

2.  Setting Up Identity Mapping Between Windows and Oracle Solaris Systems

3.  Setting Up a Oracle Solaris SMB Server to Manage and Share Files

4.  Using SMB File Sharing on Client Systems

A.  SMB DTrace Provider



Client-Side Caching for Offline Files

The SMB server provides a per-share configuration property to support client-side caching for offline files. Although the SMB server enables you to configure this feature, only the client manages client-side caching and access to offline files. You can use the zfs command to configure this feature by setting the csc property for a share.

The following are valid values for the csc property:

Example 1-1 Configuring Client-Side Caching

The following example shows how to configure client-side caching on shares.

First, create and share a file system. When you are using SMB, it is best practice to create a mixed-mode ZFS file system, which is the default. If you have both NFS and SMB clients using a mixture of different character sets on the same file system, you might also want to set the utf8only property and consider specifying the charset=access-list NFS share property.

The share.smb property can only be set to on or off. Specifying share.smb=on during dataset creation shares the dataset with the default share properties.

# zfs create -o utf8only=on -o share.smb=on tank/zvol
# share
IPC$                            smb     -       Remote IPC
c$              /var/smb/cvol   smb     -       Default Share
tank_zvol       /tank/zvol      smb     -
# zfs get share tank/zvol%

NAME        PROPERTY         VALUE       SOURCE
tank/zvol%  name             tank/zvol%  -
tank/zvol%  share.protocols  smb         local
tank/zvol%  share.state      shared      -
tank/zvol%  share.point      /tank/zvol  -

If you specify share.smb=on during dataset creation, the share is automatically created as a default share. The name of the share is based on the share path, where slashes (/) are replaced by underscores (_).

The automatic (auto) share is represented as tank/zvol%, which is the ZFS property name for the auto share. The default share name is constructed from the file system name. Invalid characters are converted to underscores. The property stores the default share name, which is the name by which the share is published. The following example uses a default share name of tank_zvol.

To list automatic shares, use the zfs list -o share command:

# zfs create -o utf8only=on -o share.smb=on tank/zvol
# zfs get share tank/zvol%
# zfs list -o share
tank/zvol%  tank_zvol  smb        shared       /tank/zvol
zfs get tank/zvol%
tank/zvol%  tank_zvol  -

To create a share with non-default values, use the zfs command, as shown in the following example:

First, create the dataset.

# zfs create -o utf8only=on tank/zvol

Next, create and enable an SMB share with the name of ashare.

# zfs share -o share.smb=on tank/zvol%ashare
# zfs get share tank/zvol%ashare
NAME                    PROPERTY        VALUE                   SOURCE
tank/zvol%ashare        name            tank/zvol%ashare        -
tank/zvol%ashare        share.protocols smb                     local
tank/zvol%ashare        share.state     -                       -
tank/zvol%ashare        share.point     /tank/zvol              -

Then, view the active shares on the system.

# cat /etc/dfs/sharetab
/tank/zvol ashare smb -

The following command creates a new share, bshare, with the csc property set to auto:

# zfs share -o share.smb=on -o tank/zvol%bshare
# zfs get share,share.smb.all tank/zvol%bshare
NAME                    PROPERTY                VALUE                   SOURCE
tank/zvol%bshare        name                    tank/zvol%bshare        -
tank/zvol%bshare        share.protocols         smb                     -
tank/zvol%bshare        share.state             -                       -
tank/zvol%bshare        share.point             /tank/zvol              -
tank/zvol%bshare        share.smb.abe           off                     default
tank/zvol%bshare                          default
tank/zvol%bshare        share.smb.catia         off                     default
tank/zvol%bshare           auto                    local
tank/zvol%bshare        share.smb.dfsroot       off                     default
tank/zvol%bshare        share.smb.guestok       off                     default
tank/zvol%bshare        share.smb.none                                  default
tank/zvol%bshare                                    default
tank/zvol%bshare                                    default

Using the zfs command enables you to add properties to a share without specifying all the other previously specified properties and their values.

In the following example, the first command creates a share with the name of cshare. The second command adds the csc property.

# zfs share -o share.smb=on tank/zvol3%cshare
# zfs set -o tank/zvol3%cshare

You can also set the csc property on autohome shares in the smbautohome map. As with the ZFS share property, multiple property-value pairs can be specified in a comma-separated list. The following smbautohome map disables client-side caching by default, but sets csc=auto for /export/home/john:

*      /export/home/&,description=&
john   /export/home/&,dn=oracle,dn=com,ou=users