At my work we generate a lot of data for analysis, such that we have to keep purchasing new NASs for data storage. This has created a situation where on our computational servers we have many NASs mounted and we have to keep of track which dataset is on which NAS. Each NAS has a similar directory structure so for example if datasetA was on NAS foo then it would be in /mnt/foo/data/datasetA on the server, while datasetB on NAS bar would be at /mnt/bar/data/datasetB. I am thinking of creating a single data folder on the local filesystem and symlinking all the datasets from the mounted NASs onto it, e.g.:
mkdir /data
ln -s /mnt/foo/data/* /data
ln -s /mnt/bar/data/* /data
Doing this, we would just access the datasets from /data and wouldn't care about which NAS the data was actually stored on. I think this would work, except whenever a new dataset appears on an NAS, we would need to manually symlink it into /data. Is there a way to set up these symlinks such that the new directories appear automatically? I guess one option is just to set up a cron job that re-runs the linking commands periodically, but maybe there's a better solution.