Are NFS and Samba/CIFS exports of the same directory/filesystem supported on Red Hat Enterprise Linux?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux (RHEL) including:
    • Red Hat Enterprise Linux 6
    • Red Hat Enterprise Linux 7
    • Red Hat Enterprise Linux 8
    • Red Hat Enterprise Linux 9
    • Red Hat Enterprise Linux 10
  • Red Hat Software Storage Appliance (RHSSA) version 3.2
  • Red Hat Storage (RHS) 2.0
  • Red Hat Storage (RHS) 2.1
  • Red Hat Storage (RHS) 3
  • A directory/filesystem is exported or is under consideration for exporting using Samba/CIFS AND NFS at the same time.

Issue

  • Is it possible to export a directory with both NFS and Samba protocols simultaneously?

Resolution

Exporting a directory or filesystem via NFS and Samba/CIFS/CTDB simultaneously on RHEL is not supported by Red Hat, whether in clustered or standalone environments.

It is unsafe to configure Samba/CIFS/CTDB and NFS to export the same directory as it risks file corruption, and therefore unsupported.

See this solution for further details on exporting data with NFS or Samba/CIFS/CTDB individually in a clustered environment. Keep in mind that exporting the same data with both protocols is not supported by Red Hat, including in clustered environments with GFS/GFS2.

Root Cause

  1. Exporting NFS and Samba from the same directory tree at the same time is unsupported regardless of the underlying filesystem in question, be it GFS, GFS2, EXT3, EXT4, or XFS.

  2. It is unsupported because the internal cache control of NFS and Samba are not aware of the other. There may also be issues during recovery. Other complications arise from Windows and Linux having different types of ACLs.

  3. The situation is even more complex if GFS or GFS2 is the exported filesystem. GFS and GFS2 have their own locking layers that can cause further conflicts with network filesystem exporting such as NFS or Samba. Feel free to consult our Support Policies for RHEL Resilient Storage - Mounting conditions and procedures for gfs2 filesystems for more info.

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.