Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Fairly-new to Linux and am trying to see if I can start getting a little clever. I have a server that contains files that I'd like to have "locally" accessible on other servers directly under the / directory:

Server1
    /opt/
        fizz/
            buzz/ --> the directory that contains interesting stuff

Server2
    /opt/
    /buzz/ --> references the Server1/opt/fizz/buzz/ directory

I spent some time reading up on this and I stumbled across all sorts of terms like "shared directories", "mounted drives", "mounted directories", etc.

What is the best solution for what I need? Essentially, the contents in this buzz/ directory are huge and would be very expensive to query Server1 for every time I want them on another server. It would be nice if each server had a local link to that directory as if the directory was stored locally, right there on the server.

Thanks in advance!

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

I think

[it] would be very expensive to query Server1

and

it would be nice if each server had a local link to that directory as if the directory was stored locally

are contradictory. The former implies that you think a network mount would not be feasible in your environment. The latter implies that you want the only set of data on Server1 and that don't want to rsync seperate copies between locations.

This is a nice article on NFS, how it works, how to set it up, and its security. I think you'll find that a network share via NFS will be perfectly acceptable.

share|improve this answer
add comment

If you really want to have local copies, rsync the directories from server1 to the other ones. But you need to have a concept how to deploy changes made on server2 to server1. on the other hand, do you rellay know (e.g., you benchmarked it) that your nfs access would be slow or dou you feel (there is sth in your stomach) it'll be slow?

However rsync example four you:

rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/ 
share|improve this answer
add comment

How huge is huge?

The traditional way to do this is put /opt/fizz/buzz into Server1's /etc/exports file and restart NFS to export it, then "mount Server1:/opt/fizz/buzz /buzz" on server2.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.