SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11
For this discussion, the term "loopback mount" refers to the case where an NFS Server is exporting a file system, and on that same device, an nfs mount is performed to mount that same file system locally again. The mount might therefore be called a "loopback mount" or a local NFS mount of the system's own NFS export.
In most cases, loopback mounts are not necessary, because bind mounts can accomplish a similar thing with better performance, because (with bind mounts) less software layers are needed to get the work done. Even so, sometimes loopback mounts are used for temporary NFS testing. The most common production use case for loopback mounts is when cluster design might create a situation where it is unknown whether the mounting node and the exporting node are really the same node or not. Therefore, an NFS mount may be needed instead of a bind mount, and in some cases that NFS mount might turn out to be "loopback mount".
Please note that the term "loopback mount" does not necessarily refer to the use of loopback address of 127.0.0.1. The mount may have been accomplished using any IP address bound to the machine.
Also, this "loopback" term does not refer to the mount option "loop", which is used to mount a file (such as an ISO) as a block device.
The practice of NFS mounting this way is not prevented by Linux. (It can be done.) However, that does not answer the question of whether it is recommended or supported.
The short answer:
Loopback mounts are supported on SLES 15 and 12, but only for NFS v3 (not NFS v4). Loopback mounts (v3) are supported on SLES 11 SP4 as well, if maintenance kernel 3.0.101-77.1 or higher is present.
These fixes are also in SLES 11 SP3 LTSS kernel 3.0.101-47.106.59 (available only to customers with LTSS contracts), although the official stance (that these loopback mounts are not supported) remains in place for SLES 11 SP3, even with these LTSS updates.
The long answer:
Traditionally, the practice of nfs loopback mounting has not been recommended or supported in any Linux environment. There are known problems with nfs loopback mounts. The problems deal with deadlocks which can occur due to conflicts that arise between memory allocation, memory freeing, and memory write out. Because of the potential for deadlocks, loopback mounting has been generally considered unsupported by all of the Linux community.
On SLES 12 and 15, improvements to NFSv3 allow loopback mounts to be supported. Note that this support does not apply to NFSv4, despite the fact that this v3 vs v4 clarification is not currently mentioned in the SLES 12 release notes, which merely say:
"3.4.9 Mounting NFS Volumes Locally on the Exporting Server
With SUSE Linux Enterprise 12, it is now possible to mount NFS volumes locally on the exporting server."
On SLES 11, for the most part this ability has not been recommended or supported. In fact, the release notes for SLES 11 SP4 mention this:
"184.108.40.206 Mounting NFS Volumes Locally on the Exporting Server
Mounting NFS volumes locally on the exporting server is not supported on SUSE Linux Enterprise systems, as it is the case on all Enterprise class Linux systems."
And the release notes for 11SP3 and 11SP2 contain similar statements. (And the same lack of support is true for all earlier releases, as well.)
However, SUSE has back-ported the NFSv3 improvements into SLES 11 SP4, in response to enhancement requests. If NFSv3 loopback mount support is desired on SLES 11, it must be running SP4 plus maintenance updates which bring the kernel to version 3.0.101-77.1 or higher.
The fixes which were required for use of loopback mounts were also added to SLES 11 SP3 LTSS kernel 3.0.101-47.106.59, which is expected to be the final LTSS kernel for SLES 11 SP3. Note that a contract for LTSS (Long Term ServicePack Support) is necessary to obtain updates from the LTSS maintenance channel. ALSO NOTE: Despite willingness to add these fixes to the SLES 11 SP3 LTSS channel, SUSE has not changed their support stance for loopback mounts on SLES 11 SP3. They are not supported.
An extensively detailed discussion of the issues which have prevented the support of loopback mounts can be found at the links below. The first is a general background discussion of memory issues. The second and third links get into the nfs loopback mount deadlocks concerns.
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.