You are not logged in. Login or Register for free.
Title only?
Strange sound and vision from here to the end of the world.
"We're fans first, journalists second."






  7 comments
  Email this

  


Posted on Thursday, September 28th, 2006 18:07:49 GMT by: quietearth
Posted under: ubuntu nfs server

Looking around on google I didn't see a straightforward howto on the first page for setting up an nfs serve, so here's a little writeup. There are 2 different ways we can do this, in kernel or user space. Of course, kernel is faster so we'll use that one. First off let's install the packages:
# apt-get install nfs-kernel-server nfs-common

This will start multiple services, including portmap and mountd, if you run:
# rpcinfo -p
you'll see what's running. If you're open to the outside you're going to need to block these via hosts.allow and hosts.deny in /etc. Check out the man pages on these for further info.

Now we can modify /etc/exports to make our file system available. This is a different format then a normal unix exports file, but no worries. We can also export via subnet, but I just want to make one host available inside my network, and I want to make it read write. The no_root_squash line makes it so root isn't translated to a nobody id which is default nfs behavior.
/filesystem  hostname(rw,no_root_squash)
and then export the filesystem:
# exportfs -a

Now if we run showmount, we'll see the filesystem available:
# showmount -e
Export list for localhost:
/filesystem hostname


On the remote system where we want to mount from, we might need portmap, lockd, and statd running. This shouldn't be necessary, but your system will pause for a couple of minutes on bootup while it tries to mount it if these aren't installed. So if it's ubuntu, just run:
# apt-get install nfs-common
and then we can modify /etc/fstab and add the line in:
REMOTEHOST:/filesystem /filesystem nfs rw 0 0
and run:
# mount -a

and everything should work fine. This filesystem will now be automatically mounted on every boot.

Tested under dapper and edgy.

Pingbacks

Pingback from http://www.odonnellweb.com/?p=3408
on May 18th, 2007 23:20:43 GMT

Pingback from http://blog.mournival.com/index.php/2007/09/24/nfs-setup/
on September 24th, 2007 18:52:45 GMT


RSS Feed for comments

Comments

i tried that on my (dapper) cluster; 1 server; 10 clients (not identical hardware). the result is that only 3 of the machines mount /filesystem automatically; the rest does not. typing mount -a afterwards works...

(hack: i wrote a boot up script that is launched late in the boot process. it waits for a few seconds and then mounts /filesystem. this is ugly, but it works)

Posted by: Anonymous | November 1, 2006 08:26:56 am | permalink

user icon This might just be a udp issue (which is by default how nfs works). Try changing "rw" to "rw,proto=tcp". This should also make it run faster.

Another note is that in fstab all fields should be seperated by tabs, not spaces.

Also if you have multiple clients from the server use:
/filesystem hostname1(rw,..) hostname2(rw,..) hostname3(rw,...)

Posted by: quietearth | November 1, 2006 10:38:58 am | permalink

worked great

Posted by: Anonymous | July 9, 2007 05:51:41 am | permalink

Hi, this is the best article in this area. Very easy to follow. Great job!

Posted by: Chris | February 26, 2008 01:45:08 pm | permalink

Post a comment

Name:
(default is Anonymous)
Contact:
(email or url, optional)
Comment:
(no html or bbcode)
Captcha:



Related articles
Posted on Sunday, October 1st, 2006 3:47:00 GMT by: quietearth |   11 comments

Posted on Thursday, October 26th, 2006 19:59:41 GMT by: quietearth |   3 comments

Posted on Thursday, November 16th, 2006 0:10:33 GMT by: quietearth |   1 comment

Posted on Monday, January 8th, 2007 1:07:05 GMT by: quietearth |   0 comments

Posted on Monday, April 2nd, 2007 2:28:12 GMT by: quietearth |   4 comments




rss | subscribe via email | the team | contact us | mobile
© 2006-2009 Don Neumann (except where applicable)
We are looking for free hosting with a cut of sales, you'll get a link right here.
If you want news of your film posted, use our contact page and we'll check it out
Permission is granted to use material from this site if you provide a reference to us via a link and DO NOT HOTLINK.


GenreBanners.com Banner Exchange