Hey guys, I've been a lurker here for awhile. I'm hoping you can help me out with an issue I'm having with NFS directory.
I have a cluster that I'm working with that requires multiple external drives to be plugged in from time to time. These drives change frequently so they will only be used a couple of weeks before other new drives will be sent to be plugged in.
I auto mount external USB drives to /media/usb using a custom udev rule. I have (tried to) set up a NFS directory that exports /media/usb to all other nodes on the network, so that all drives automatically mounted will be accessible from any node.
The issue I'm running into is if I plug in for instance, 3 drives, they all auto mount to /media/usb, but if I use NFS to export /media/usb in /etc/exports then it will only mount the partitions directly underneath /media/usb.
For instance, /media/usb/drive1, /media/usb/drive2, /media/usb/drive3, will all be mounted, but the directories drive1, drive2, and drive3, are all empty.
In order to get the files to be visible/accessible on the other nodes, I have to explicitly export /media/usb/drive1, /media/usb/drive2, and /media/usb/drive3 in /etc/exports. And since there are several nodes, this can be a cumbersome task each time a new drive is plugged in.
I'd obviously like for this to be completely automatic once I plug it in. my /etc/exports looks like below:
/media/usb/123456789 server01(rw,sync,no_root_squash,no_subtree_check,nohide)
The 1234..9 number is the UUID of the drive, just FYI.
So my question is, is there a way to export all the files and directory within a directory without having to explicitly exporting each one? If so, how?
Let me know if you need any more information. I feel like this is probably a simple fix, but for some reason it's escaping me.
Thanks!
[link][6 comments]