![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
First Cup of Ubuntu
![]() Join Date: Apr 2006
Beans: 4
|
HOWTO: NFS Server/Client
Why NFS?
I simply wanted to experiment with NFS, and couldn't seem to find the documentation here on the forums. I found using NFS just as easy if not easier than using Samba for sharing between a few of my Unix based systems. In order to share a folder it only required a single line in a configuration file under /etc/exports, and a single line under /etc/fstab on the client to mount the share on each client at boot. I mostly edited and moved things around from these guides to make a more complete single guide to getting this working using Ubuntu. http://www.cyberciti.biz/tips/ubuntu...nfs-share.html (for client configuration) http://www.redhat.com/docs/manuals/l...nfs-mount.html (for mounting using fstab) <removed dead link> http://www.freebsd.org/doc/en_US.ISO...twork-nfs.html (contains more info about NFS) Install NFS Server Support at the terminal type sudo apt-get install nfs-kernel-server nfs-common portmap When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run: sudo dpkg-reconfigure portmap sudo /etc/init.d/portmap restart Editing /etc/exports the /etc/exports file is used for creating a share on the NFS server invoke your favorite text editor or sudo vi /etc/exports Here are some quick examples of what you could add to your /etc/exports For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255
Or for Read Only from a single machine
sudo /etc/init.d/nfs-kernel-server restart Also aftter making changes to /etc/exports in a terminal you must type sudo exportfs -a Install NFS client support sudo apt-get install portmap nfs-common Mounting manually Example to mount server.mydomain.com:/files to /files. In this example server.mydomain.com is the name of the server containing the nfs share, and files is the name of the share on the nfs server The mount point /files must first exist on the client machine. cd / sudo mkdir files to mount the share from a terminal type sudo mount server.mydomain.com:/files /files Note you may need to restart above services: sudo /etc/init.d/portmap restart sudo /etc/init.d/nfs-common restart Mounting at boot using /etc/fstab Invoke the text editor using your favorite editor, or gksudo gedit /etc/fstab In this example my /etc/fstab was like this:
It is a good idea to test this before a reboot in case a mistake was made. type mount /files in a terminal, and the mount point /files will be mounted from the server. Last edited by dmizer; August 5th, 2009 at 07:10 PM.. Reason: removed dead link |
|
|
|
|
|
#2 |
|
May the Ubuntu Be With You!
![]() Join Date: Mar 2006
Location: Hampshire,UK
Beans: 1,640
Xubuntu 9.04 Jaunty Jackalope
|
Re: HOWTO: NFS Server/Client
Thanks, this howto made simple what the wiki howto makes look difficult. I can now dispense with the vagaries of samba
__________________
Experience is the only genuine knowledge Still stuck on Jaunty until they fix the Karmic kernel for my dvb card (Asustek Dual P7131) Upgrade scmupgrade Bimmablog |
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Apr 2006
Location: Toronto
Beans: 19
Ubuntu 9.04 Jaunty Jackalope
|
Re: HOWTO: NFS Server/Client
|
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() Join Date: Aug 2006
Beans: 7
|
Re: HOWTO: NFS Server/Client
Thank you for writing this!!! I have been sifting through posts for two days trying to figure out how to share files between my two ubuntu(dapper) pc's. Your instructions worked the first time I tried them.
|
|
|
|
|
|
#5 | ||
|
First Cup of Ubuntu
![]() Join Date: Apr 2006
Beans: 4
|
Re: HOWTO: NFS Server/Client
Quote:
Quote:
Last edited by malco2001; September 11th, 2006 at 12:28 AM.. |
||
|
|
|
|
|
#6 |
|
Just Give Me the Beans!
![]() Join Date: Jun 2006
Location: Austin, TX
Beans: 50
Ubuntu 8.04 Hardy Heron
|
Re: HOWTO: NFS Server/Client
Had some serious speed problem with Samba. Setting up NFS from your guide works well! Now I'm doing 30-40Mb (gigabit network) per sec instead of 1-3Mb with Samba. Thanks!
__________________
Vista on home desktop. Arch on laptop and workstation. Arch, Solaris, Debian, Ubuntu, CentOS/RHEL servers. |
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() Join Date: Sep 2006
Beans: 2
|
Re: HOWTO: NFS Server/Client
thanks for this guide really cool
however I have a bunch of Disks mountet on the server i home dir and I wanted to just mount the home dir in the client. I did'nt work. I could not see the subdirs for some reason. thoug if in export I make explicit what dirs to export where the dirs are disks, then it worked fine after restarting the service and making new mount points of course. though if someone can explain how to just mount the home of the server that would be great. I did everything as the guide instructed. |
|
|
|
|
|
#8 |
|
Just Give Me the Beans!
![]() |
Re: HOWTO: NFS Server/Client
If you're connection to a Linux NFS server from Mac OS X, you need to specify 'insecure' in your exports and map the user IDs since Macs use uid 501 for the first regular user. For my /etc/exports I use:
/home 192.168.0.0/255.255.255.0(rw,async,insecure,all_squash,anonuid =1000,anongid=1000) |
|
|
|
|
|
#9 |
|
5 Cups of Ubuntu
![]() Join Date: Aug 2006
Beans: 27
|
Thankyou malco2001,
Very precise and to the point, gained access to my freenas box in mere moments once i read this post, now to make sunbird share it's calendar file for both my ubuntu and windows boxes. Many thanks Pebbles |
|
|
|
|
|
#10 |
|
First Cup of Ubuntu
![]() |
Re: HOWTO: NFS Server/Client
thanks, I found this helpful, and quite easy to config with the built in nfs module in webmin. I also experienced a speed increase of about double over samba.
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|