Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two Ubuntu servers. One of them has a directory with data. I want this directory to be visible (and writable) by the second server. How can I do this? What tool to use?

share|improve this question

closed as not a real question by womble, Ward, Tim Brigham, Scott Pack, EEAA Aug 14 '12 at 0:31

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

If only this didn't exist;… ... You already have the NFS tag in your question, have you thought of doing any form of basic self-help so far, maybe looking up what NFS is and how it's used, it's very simple basic stuff that professional sysadmins really could do with knowing – Chopper3 Jul 24 '12 at 10:39
up vote 4 down vote accepted

On the 'server' add an entry into your /etc/exports to share the directory e.g.

/directory/with/data secondserver.tld(rw)

which allows secondserver read/write access to the directory/with/data

then use exportfs to share the directory

exportfs -r

and you can verify your export with

/directory/with/data    secondserver.tld

You can now mount your directory on secondserver

mount server:/directory/with/data /mnt

and you can verify the mount

mount -t nfs
server:/directory/with/data on /mnt type nfs (rw,addr=

You may want to add an entry to your fstab to have it mount on boot too

server:/directory/with/data /mnt    nfs rw 0 0 

You'll probably want to read the various man pages I linked to too.

share|improve this answer
Note: I needed to restart the first server after installing exportfs and running exportfs -r. – assylias yesterday
That wouldn't be normal. – Iain 22 hours ago

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