0

I'm usign a Debian server (Jessie) as an NFS server. All exported NFS-shares are mounted filesystems using loop devices. They are mounted in the fstab without any special options & the mountpoints are managed within a common root directory:

  • /nfsshares *(rw,fsid=0,async)
  • /nfsshares/mp1 *(rw,sync,no_root_squash,no_subtree_check,nohide)
  • /nfsshares/mp2 *(rw,async,no_root_squash,no_subtree_check,nohide)

mp1,mp2 are mountpoints for the loop devices!

Starting the nfs server causes an entry in the log file: /nfsshares/mp1 und /nfsshares/mp2 have same filehandle for * using first.

All NFS-clients always mount the first share - regardless of the used mount points. I think that this has something to do with the used loop-device for the mountpoints.

Isn't possible to use mounted images for NFS shares?

ThanX /franzR

1
  • Can you clarify which version of NFS is being used? Commented Jul 13, 2015 at 20:45

2 Answers 2

0

Depending on the locations of the directories being mounted, as well as client and server configurations it may be valuable to ensure that /etc/exports is setup correctly on the server. This answer on setting up NFS with mount-points as sub-directories might be helpful.

0

This answer is probably a bit late to the party, but in the hopes of helping others with the same problem:

The problem is likely an identical fs UUID (at least it was for me). Specifying a fsid in the export solved the issue. (Do note that fsid=0 is used for the 'full export', see https://linux.die.net/man/5/exports).

So adding fsids != 0 for the 2 loop devices exports should fix this issue. Result should look like:

`/nfsshares *(rw,fsid=0,async)` `/nfsshares/mp1 *(rw,fsid=1,sync,no_root_squash,no_subtree_check,nohide)` `/nfsshares/mp2 *(rw,fsid=2,async,no_root_squash,no_subtree_check,nohide)` 

Got the inspiration from: here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.