I have several internal disk mounted on the Debian 8.7 server.
mount /dev/sdd1 /media/disk1
mount /dev/sde1 /media/disk2
mount /dev/sdf1 /media/disk3
Now I am trying to export /media via nfs.
/media 192.168.1.0/24(rw,sync,no_subtree_check,insecure,all_squash,nohide,crossmnt)
On the client(Mac) side I am mounting NFS like following
mount -t nfs -o rw,sync <ip_of_server>:/media nfsmedia
It does mount without any error. It shows the 3 directories as expected, however there is no content in nfsmedia/disk1, nfsmedia/disk2, nfsmedia/disk3 directories.
If I export each disk separately and mount separately on client side, it works.
/media/disk1 192.168.1.0/24(rw,sync,no_subtree_check,insecure,all_squash,nohide,crossmnt)
/media/disk2 192.168.1.0/24(rw,sync,no_subtree_check,insecure,all_squash,nohide,crossmnt)
On client side mount
mount -t nfs -o rw,sync <ip_of_server>:/media/disk1 nfsmedia
This does mount disk1 as expected, will all the contents. However it is not optimal to mount several mountpoints across multiple computers.
Is there a way to export them as a single directory?
Possible/Workaround solution
This seems to be working. unix.stackexchange.com/questions/198590/what-is-a-bind-mount Bind all locally mounted disks to new set of folders and export that single folder via NFS. However not sure if it is the ideal solution for the problem.