I'm running a Lubuntu QEMU VM under Bunsenlabs Lithium (Debian 10). I'm testing different ways to share folder with NFS. First created share was OK, but the host refused to share the second folder.
=== SNIP ===
/etc/exports:
/Data/virtualization/KVMShare *(rw,sync,no_root_squash,no_subtree_check)
/Data/share2 *(rw,sync,no_root_squash,no_subtree_check,insecure)
Both exportfs and showmount show that the folders are being exported:
pg@TREX:~$ sudo exportfs -rav
exporting *:/Data/share2
exporting *:/Data/virtualization/KVMShare
pg@TREX:~$ sudo showmount -e localhost
Export list for localhost:
/Data/share2 *
/Data/virtualization/KVMShare *
Client shows the same:
pg@PT-Lubu:~$ sudo showmount -e 192.168.122.1
Export list for 192.168.122.1:
/Data/share2 *
/Data/virtualization/KVMShare *
=== SNIP ===
... and this isn't supposed to work???
pg@PT-Lubu:~$ sudo mount -t nfs4 192.168.122.1:/ share
pg@PT-Lubu:~$ ll -A share
lrwxrwxrwx 1 root root 6 aug 31 18:30 share -> /share/
pg@PT-Lubu:~$ ll -A share/Data
total 8
drwxrwxrwx 2 nobody nogroup 4096 aug 31 19:17 share2/
drwxrwxrwx 6 root root 4096 aug 31 13:38 virtualization/
What's going on?
EDIT
As @Michael Hampton below kindly helped me see the error in my understanding, I snipped out parts that are no longer relevant.
I still don't understand why I'm able to mount the parent directories while I'm sharing the children. What I'm looking for is this:
- Server is sharing from Drive1 folders /Data/Share/Foo1 and /Data/Share/Foo2
- Client sees and can mount Server:/Foo1 and Server:/Foo2
- Client neither sees nor can mount Server:/Data or Server:/Data/Share
- If Drive1 fails I can simply activate Drive2/Share/Foo1 & 2 with the same share IDs
- Client still sees and mounts only Server:/Foo1 & 2
I'd really appreciate if someone can point me to the right direction.
Before asking I already checked a number of resources over the inertnet, some of them very detailed. But sentences like "this is possible using appropriated options" aren't helpful if said options aren't pointed out. Also spending 2 hours trying to figure out why things aren't working when following detailed instructions, only to find out that the option isn't "no_sub_tree_check" as described, is somewhat less than extremely productive.