LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-04-2006, 01:15 PM   #1
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Rep: Reputation: 15
NFS not installed?


Hello.

I want to share files between my Ubuntu laptop and desktop, so, i did a little bit of looking around, and saw that to do this i use NFS, however, when i right click the folder to be shared and have to select what to share it with, all it says is SMB. Now, i know that has to do with windows/linux sharing, but there's no NFS there... do i have to install NFS? I looked in synaptic and there's a bunch of NFS related stuff there, and i'm not quite sure what to install. Any help would be greatly appreciated. And yes, i'm a big time linux novice, haha.

I'm running Ubuntu 6.06 by the way. and my laptop is connected wirelessly to a router and my desktop is wired. Just thought that a bit of info might be helpful.

Thanks in advance!
 
Old 08-04-2006, 01:55 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,354
Blog Entries: 8

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
I don't know if Ubuntu has nfsd installed by default; you can install it if it isn't. It'll install several other nfs related packages automagically.

"nfsd" means "nfs daemon"; most servers are "daemons". You only have to install nfsd on systems that are meant to be file servers. The equivalent in Windows is any computer with a "shared folder" in it. A computer without any "shared folders" doesn't need the server daemon.

Now, there are a number of GUI based options for setting up nfs shares, but it's so easy to do it manually that I don't see any benefit to using a GUI. It's not like SAMBA, where configuration is a complex nightmare. All you need to do on the server is create a file named /etc/exports. For the contents, put something like:

Code:
/home/peter/my_docs *(rw,async)
After making changes to /etc/exports, you can restart the nfs daemon with the command "exportfs -rv".

On the client you'll need to create an empty directory to mount the nfs share. I suggest making this directory in the exact same location as on the server, because that way symbolic links will still work (symlinks are useful file "pointers"). In this example, the shared directory is /home/peter/my_docs, so you'd create an empty directory on the client in that location.

Then, create an entry in /etc/fstab on the client like this:
Code:
192.168.1.15:/home/peter/my_docs /home/peter/my_docs nfs rw,auto 0 0
Replace the IP address with the address of the server, or its hostname if it's in /etc/hosts. Replace "auto" with "noauto" if you don't want it to automatically mount the share on bootup.

To manually mount this share, you use the command, "mount /home/peter/my_docs".
 
Old 08-04-2006, 02:57 PM   #3
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
Ubuntu doesn't include NFS server packages by default. I'd actually suggest installing the SSH service instead, which enables not only regular file transfers over the network but also rsync synchronization etc.
 
Old 08-04-2006, 03:27 PM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,354
Blog Entries: 8

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
I use rsync all the time on nfs shares--no ssh daemon involved (no rsync daemon involved either, for that matter).

Ssh is fine for making manual file transfers, but if you want to SHARE files, then something like nfs or samba is preferable. With nfs, you can access shared files just like they were local files--and with very fast performance, also.
 
Old 08-04-2006, 06:54 PM   #5
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Original Poster
Rep: Reputation: 15
OK! Thanks, however... I followed your instructions yet i cant see the share where i mounted it... i hope i followed your instructions well. is there anyway to check that everything is properly installed and configured? (NFS wise)

Thanks in advance
 
Old 08-04-2006, 10:46 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,354
Blog Entries: 8

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
If something were wrong, then the "mount /home/peter/my_docs" command should have complained with an error of some sort.
 
Old 08-04-2006, 11:58 PM   #7
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Original Poster
Rep: Reputation: 15
when i do the mount command it just hangs, it doesn't say anything. it just shows a blinking cursor after i type in the password when i do the sudo mount.
 
Old 08-05-2006, 12:33 AM   #8
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Original Poster
Rep: Reputation: 15
ok, i let it run for a while, and when i came back it said:
mount to NFS server '192.168.1.101' failed: server is down.

uhm... i'm not quite sure what's going on...
 
Old 08-05-2006, 03:02 AM   #9
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
first can you ping 192.168.1.101 ?
if you can then it's a problem with NFS, if not it's a problem with the network.

try doing
Code:
ps | grep "nfsd"
on the server to see if there is a nfs server running
 
Old 08-06-2006, 01:10 AM   #10
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by binary_y2k2
first can you ping 192.168.1.101 ?
if you can then it's a problem with NFS, if not it's a problem with the network.

try doing
Code:
ps | grep "nfsd"
on the server to see if there is a nfs server running
i can ping it

the command doesnt work. nothing happens it just goes back to normal... (like back to my user name or whatever)
 
Old 08-06-2006, 04:43 AM   #11
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
That means that the NFS server isn't running,
you'll need to run
Code:
sudo /etc/init.d/nfs-user-server start
OR
sudo /etc/init.d/nfs-kernel-server start
depending on what package you installed
 
Old 08-06-2006, 07:49 PM   #12
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by binary_y2k2
That means that the NFS server isn't running,
you'll need to run
Code:
sudo /etc/init.d/nfs-user-server start
OR
sudo /etc/init.d/nfs-kernel-server start
depending on what package you installed
I was able to run:
Code:
sudo /etc/init.d/nfs-user-server start
and it said "Starting NFS servers: nfsd mountd."
however i still cant connect to it and whenever i do:
Code:
ps | grep "nfsd"
it still does nothing, and my laptop still cant connect.

is there anything that could be stopping me from doing this properly? the NFS package that i got from synaptic was "nfs-user-server", was that the right one? should i give the kernel one a shot? and the nfs-user-server was the only nfs related package i got, should i get others?

thanks in advance

Last edited by TRaven; 08-06-2006 at 07:52 PM.
 
Old 08-07-2006, 03:29 AM   #13
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
try
Code:
ps ax|grep nfsd
to see if the daemon is runnung.
and also try
Code:
sudo netstat -pan|grep nfsd
to see if you have the ports open.

If you see the daemon and the ports open (2049 TCP and UDP) then, check firewall settings
 
Old 08-07-2006, 03:35 AM   #14
TRaven
Member
 
Registered: Sep 2005
Location: Florida
Distribution: Ubuntu 7.04, Ubuntu Server 7.04, DSL,
Posts: 44

Original Poster
Rep: Reputation: 15
When i do:
Code:
ps ax|grep nfsd
i get:
5113 ? Ss 0:00 /usr/sbin/rpc.nfsd
7660 pts/0 R+ 0:00 grep nfsd

When I do:
Code:
sudo netstat -pan|grep nfsd
I get:
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN 5113/rpc.nfsd
udp 0 0 0.0.0.0:2049 0.0.0.0:* 5113/rpc.nfsd
unix 2 [ ] DGRAM 13561 5113/rpc.nfsd

and i dont run a firewall, unless ubuntu has a built in thing. is there anything that is wrong in the results i got?
 
Old 08-07-2006, 03:57 AM   #15
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
just a shot in the dark, do you have nfs-client installed?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allowing NFS in IPTABLES: Fix port for NFS Lock Manager Swakoo Linux - General 10 08-25-2006 05:24 AM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM
RHEL Installed over NFS logosys Red Hat 1 09-03-2005 11:57 AM
NFS installed, but no access elbe3321 Linux - Networking 2 08-27-2004 08:54 AM
Installed Slackware with NFS thef0x82 Linux - Laptop and Netbook 2 06-17-2004 02:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration