Connecting using CIFS from Linux

To attach to a CIFS share or export using a Linux operating system, use a CIFS client.

To access the share or export, a user must have appropriate POSIX permissions for accessing the path, and ACL authorization to read (r) and execute (x) each directory in the full path of the directory on which the share or export is mounted. If an Storwize V7000 Unified system administrator has disabled the --bypassTraversalCheck option of the chcfg Storwize V7000 Unified CLI command, which is enabled by default, retain the traversal rights ACE entry to ensure that users are able to access the share or export and its subdirectories. For example, to access a share or export mounted at /ibm/mydir/mysubdir/myexport, the above ACLs, at a minimum, must be applied to /ibm, /ibm/mydir, /ibm/mydir/mysubdir and /ibm/mydir/mysubdir/myexport. See Creating shares or exports, Managing authorization and access control lists, and Authorization limitations.

Note:
  • Connecting using CIFS from AIX is not supported.
You can use the CIFS client in the Linux kernel and mount a share, similar in concept to mounting an NFS export.
Attention: Linux clients accessing file shares using the CIFS protocol with RHEL version 6.3 or lower might experience data integrity problems in error recovery scenarios. Install RHEL version 6.5 or higher with the latest patches on Linux clients to overcome these issues.
You can also use interactive CIFS clients, such as smbclient and smbget, from the Samba Software Suite that is available for any major Linux distribution. Some desktop environments have their own CIFS clients, like Gnome, where you can use the menu item Places > Connect to server, and select CIFS, after which the mounted share is displayed in the desktop environment's file browser.

Example 1: Attaching to a CIFS share or export using a Linux host

The following example describes how to connect to a Microsoft Windows™ network using the CIFS protocol from Linux. Administrators of other UNIX operating systems should consult the documentation for their CIFS client for further information. It is assumed that you have root access to the host.

The following example uses these definitions:
  • Netbios/DNS name: unified03
  • Share or export name: gpfs0all
If you do not already know the name of the share or export that you would like to access, you can use the smbclient command to obtain a list of available resources.
(root@linuxhost)~ # smbclient -L unified03 -U DOMAIN\\username
Password: <password not displayed>
Domain=[DOMAIN] OS=[Unix] Server=[IBM Storwize V7000
Unified Cluster]

   Exportname       Type      Comment
   ---------       ----      -------
   IPC$            IPC       IPC Service ("IBM Storwize V7000
Unified Cluster")
   phil            Disk      CIFS share or export of unified03 cluster for user Phil
   gpfs0all        Disk      CIFS share or export of unified03 to share or export FS gpfs0
Domain=[DOMAIN] OS=[Unix] Server=[IBM Storwize V7000
Unified Cluster]

   Server               Comment
   ---------            -------

   Workgroup            Master
   ---------            -------
(root@linuxhost)~ #
You can access the share or export using an FTP-like utility using the following command from an interactive system shell:
(user@linuxhost)~ # smbclient //unified03/gpfs0all -U DOMAIN\\username
Password: <password not displayed>
Domain=[DOMAIN] OS=[Unix] Server=[IBM Storwize V7000
Unified Cluster]
smb: \>
Furthermore, you can mount the CIFS share or export to a local directory, /tmp/mount in this example, by submitting the following command as root from a system shell:
(root@linuxhost)~ # mount -t cifs -o user=DOMAIN\\username //server/export /tmp/mount
Verify that the mount is occurred by issuing the mount command without any arguments:
(root@linuxhost)~ # mount
/dev/hda1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda2 on /boot type ext3 (rw)
proc on /var/lib/ntp/proc type proc (rw)
//unified03/gpfs0all on /tmp/mount type cifs (rw,mand)
(root@linuxhost)~ #  
Conversely, to unmount the share or export, issue the following command at the system shell:
(root@linuxhost)~ # umount /tmp/mount

The used space and free space reported to CIFS clients also depends on the quotas applicable to the current user. For details, see description in Managing quotas.