NFS mounting incorrect NFS export
This document (7010672) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 10
Situation
# /etc/exports
/exports/test1 *(rw,sync,insecure,root_squash,no_subtree_check,fsid=25)
/exports/test2 *(fsid=25,wdelay,rw,sync,insecure,root_squash,no_subtree_check)
Resolution
# /etc/exports
/exports/test1 *(rw,sync,insecure,root_squash,no_subtree_check,fsid=25)
/exports/test2 *(fsid=26,wdelay,rw,sync,insecure,root_squash,no_subtree_check)
Note that different paths should have different fsids. If it is the same path specified separately for 2 different clients, those fsids can (and should) be the same. An fsid can be set anywhere from 0 - 255. However, 0 has special meaning for NFS v4, so if you are using NFS v4, only use fsid=0 on the top (fake root) of the export hierarchy.
Cause
fsid=num|root|uuid
NFS needs to be able to identify each filesystem that it exports. Normally it will use a UUID for the filesystem (if the filesystem has such a thing) or the device number of the device holding the filesystem (if the filesystem is stored on the device).
As not all filesystems are stored on devices, and not all filesystems have UUIDs, it is sometimes necessary to explicitly tell NFS how to identify a filesystem. This is done with the fsid= option.
For NFSv4, there is a distinguished filesystem which is the root of all exported filesystem. This is specified with fsid=root or fsid=0 both of which mean exactly the same thing.
Other filesystems can be identified with a small integer, or a UUID which should contain 32 hex digits and arbitrary punctuation.
Linux kernels version 2.6.20 and earlier do not understand the UUID setting so a small integer must be used if an fsid option needs to be set for such kernels. Setting both a small number and a UUID is supported so the same configuration can be made to work on old and new kernels alike.
Disclaimer
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.
- Document ID:7010672
- Creation Date: 23-Aug-2012
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com