3

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.

Jigar Patel
  • 141
  • 1
  • 4
  • This seems to be working. http://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. – Jigar Patel Feb 20 '17 at 22:31
  • You can use LVM. Create one volume group based on three partitions. Or use mdadm to create RAID from these partition tables. – Khirgiy Mikhail Feb 21 '17 at 04:21
  • LVM is not an option in my case, but good idea for future consideration. – Jigar Patel Feb 21 '17 at 05:27

0 Answers0