Mounting an SMB/CIFS share on Solaris 11

Today as part of a migration project I needed to move some data from a Windows file server to our new ZFSSA whilst trying to retain as ma This article will document how to mount a Windows CIFS file share onto the local file system of the Oracle Solaris 11 system.

(this article does not discuss the setup of the SMB/CIFS services on the ZFSSA as that is beyond the scope of this article)

  • Enable the SMB client service on Solaris 11
    # svcadm enable svc:/network/smb/client
  • List available shares by exploring the windows filer
    # smbadm show-shares -t filer1
    SHARE               DESCRIPTION
    dev
    isoimages
    migdata
    prod
    software
    test
    users1
    users2
    users3
    From the about listing, we will be using the migdata share
  • Create the migration mount-pint (if it doesn't exist)
    # mkdir /data/migdata
  • Mount the remote windows share to the local directory
    # mount -F smbfs -o ro //filer1/migdata /data/migdata
    Password:
    Note: In the above command I am mounting the share read-only (-o ro) since I only want to interegate the data. Other options you could specify on the mount include...
    mount -F smbfs [-o user=username,domain=domain-name,...] //server/share mount-point
  • Verify the mount
    # cat /etc/mnttab  | grep filer1
    //filer1/migdata      /mnt/migration smbfs   rw,intr,acl,xattr,dev=8d40002   1306349654
  • View the remote data locally
    # ls /data/migdata
    stor1  stor2  stor3

At this stage you have access to the filer data allowing you to perform whatever tasks you require on the CIFS data locally.

Note: If you are performing a recursive sync, no acls or anything is carried over just the files and the timestamps. You will need to reapply the appropriate permissions manually.