0

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!

1 Answer 1

2

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.

General Options

exportfs understands the following export options:

nohide

This option is based on the option of the same name provided in IRIX NFS. Normally, if a server exports two filesystems one of which is mounted on the other, then the client will have to mount both filesystems explicitly to get access to them. If it just mounts the parent, it will see an empty directory at the place where the other filesystem is mounted. That filesystem is "hidden". Setting the nohide option on a filesystem causes it not to be hidden, and an appropriately authorised client will be able to move from the parent to that filesystem without noticing the change.

However, some NFS clients do not cope well with this situation as, for instance, it is then possible for two files in the one apparent filesystem to have the same inode number.

The nohide option is currently only effective on single host exports. It does not work reliably with netgroup, subnet, or wildcard exports.

This option can be very useful in some situations, but it should be used with due care, and only after confirming that the client system copes with the situation effectively.

The option can be explicitly disabled with hide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .