File access failure from an SMB client with sharing conflict

The SMB protocol includes sharemodes, which are locks that can be held on the whole file while a SMB client has the file open. The IBM Storage Scale file system also enforces these sharemode locks for other access.

File systems that are exported with the CES SMB service need to be configured with the -D nfs4 flags to provide the support for SMB sharemodes. Otherwise the SMB server will report a sharing violation on any file access, since the file system cannot grant the sharemode. This is also indicated by a message in the /var/adm/ras/log.smbd log, similar to this. Samba requested GPFS sharemode for for /ibm/fs1/smb_sharemode/ALLOW_N but the GPFS file system is not configured accordingly. Configure file system with mmchfs -D nfs4 or set gpfs:sharemodes=no in Samba.

The other case is that SMB access to a file is denied with a sharing violation, because there is currently concurrent access to the same file that prevents the sharemode from being granted. One way to debug this issue would be to recreate the access while capturing a SMB protocol trace. For more information, see CES tracing and debug data collection. If the trace contains the message "GPFS share mode denied for ...", then concurrent access is denied due to the file being open in the file system with a conflicting access. For more information, see Multiprotocol data access considerations.