I have setup a file server that contains two large file systems, each consisting of a single LVM logical volume (10TB and 16TB) within a single volume group. The physical volumes making up the LV are SAN LUNs connected via iSCSI/multipath.
Now, I would like to serve these to LV via NFS to a nodes in a compute cluster.
So far, I have the following config.
On server two LV are in:
/mnt/LV1
/mnt/LV2
NFS /etc/exports looks similar to
/mnt/LV1 *(rw...)
/mnt/LV2 *(rw...)
On my client I then mount each of these separately.
My question is, can I just put this in /etc/exports instead?
/mnt *(rw)
And mount in client as single point containing these two logical volumes?
Naively, this seems odd as they are separate logical volumes, but this may be proper practice also!
Best Answer
By default, exported file systems do not include the contents of directories mounted from different file systems. That is, NFS exports do not cross file system boundaries. So, in your example, if you mount
/mnt
, you'd see two empty directories only (LV1
&LV2
).The reason is that NFS clients would be seeing multiple files with identical inode numbers within a single file system, which may lead to confusion for some NFS clients. Or to avoid this problem, the NFS server would have to maintain a non-identity inode number mapping.
According to the exports(5) man page, you may use the
nohide
option to switch this feature off, and then you may hope that no software on the client gets confused when multiple files happen to have the same inode number within a single file system.