Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
3  
If only this didn't exist; blog.stackoverflow.com/2012/07/kicking-off-the-summer-of-love/… ... 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
add comment

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.

1 Answer

up vote 2 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

exportfs
/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=192.168.254.196)

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
add comment

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