Solaris CIFS Administration Guide

ProcedureHow to Configure Cross-Protocol Locking

The CIFS protocol assumes mandatory locking, but UNIX traditionally uses advisory locking. The Solaris OS can be configured to use mandatory locking on a per mount basis by using the non-blocking mandatory locking (nbmand) mount option.

When set, the nbmand mount option enforces mandatory cross-protocol share reservations and byte-range locking.

When the nbmand mount option is not set, the Solaris CIFS service will enforce mandatory share reservations and byte-range locking internally for all CIFS clients. However, without nbmand set, there is only limited coordination with NFS and local processes.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Set the nbmand mount option for an existing file system by doing one of the following:

    • Set the option by using the mount command.

      # mount -o nbmand=on fsname

      For example, the following command sets the nbmand mount option for the ztank/myfs file system:

      # mount -o nbmand ztank/myfs
    • Set the option by using the zfs create command.

      When using the ZFS file system, you can also set the nbmand option when the file system is created, so that the file system uses nbmand automatically:

      # zfs create -o nbmand=on fsname

      The following example combines the nbmand option with the mixed-case sensitivity option:

      # zfs create -o casesensitivity=mixed -o nbmand=on -o mountpoint=mntpt ztank/myfs