Solved

NFS Setup

Posted on 2000-05-10
10
255 Views
Last Modified: 2010-03-18
When I attempt to use the following command:
mount samba3:/home/public /mnt/samba3
I get an error
Mount: RPC: Program not registered
What do have to do to make this work.
0
Comment
Question by:davidpm
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 2

Expert Comment

by:jonalee
ID: 2798905
I assume you use RedHat Linux.
When you encounter this problem, I think you need to add a line in the /etc/fstab file like:

samba3:/home/public  /mnt/samba3 NFS noauto 0 0

Then run you command again
0
 

Author Comment

by:davidpm
ID: 2800021
I added that line on the client and it  did not work.
I also believe you are going the wrong direction because my command should have mounted the file system manually. IOW fstab is for bootup automation etc and is not "required" for a manual mount.
I suspect it has something to do with portmapper and perhaps hosts.allow but what I have tried has not worked so far.
0
 
LVL 2

Expert Comment

by:mzehner
ID: 2802834
You need to make sure your /etc/exports file is set up properly on your server computer, samba3.  Add the following line to the file:
/home/public clientname(rw)
where client name is the remote computer you are trying to mount the drive to.  Then type:
exportfs -a
Then you must restart the NFS daemon using linuxconf, in control panel, control service activity.  Or to restart it type ""/etc/rc.d/init.d/nfs restart".
0
 

Accepted Solution

by:
unixway52 earned 50 total points
ID: 2803137
On RH 6.1 you must install the knfsd-1.4.7-7.i386.rpm first ...

Insert your rh cd then cd /mnt/cdrom/RedHat/RPMS. Let it automount
or mount it manually.

# rpm -U knfsd-1.4.7-7.i386.rpm
# cd /etc/rc.d/init.d
# ./nfs start

I don't know why the server side has to be installed in order for the
client side to be able to talk to portmap, but at least in RH I seem to
remember it's been that way for some time. The knfsd-client gets installed
during the normal os install.



0
 

Author Comment

by:davidpm
ID: 2804556
I noticed that I did not have a exportfs command so I stumbled on your solution a few minutes before you posted it.
I will try a clean build on two machines so I'll know exactly what is required.
I defintly had to install the server side on the server but are you saying that the server package has to be installed on the client side also?
I'll try it out both ways so I'll know for sure.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Expert Comment

by:unixway52
ID: 2804597
What release of Linux are you running?
0
 

Expert Comment

by:unixway52
ID: 2805779
Sorry if I wasn't clear. Yes, you do need to install the server side for the client to work.
I'm not sure if this is specific to RH ...
I suspect not.

It had been documented some time ago in the
Caldera knowledgebase (which is based in RH).

In particular, commands like showmount need
the server running on the calling machine.

0
 

Author Comment

by:davidpm
ID: 2806401
RH 6.1
Will test with and with-out server rpm
0
 
LVL 2

Expert Comment

by:mzehner
ID: 2807635
Your client side needs only kernel support compiled in for NFS to work.  Otherwise how could diskless clients perform NFS mounts????  Of course to manually mount a drive from the client side, you need to have ability to use the mount command, but you don't need to run or install the server software.
0
 

Author Comment

by:davidpm
ID: 2807890
I wrote the following little faq sheet for my NT guys who are learning Linux.
Notice that at least for 6.1 the nfs server is not required to mount a nfs directory and is not required for showmount.

To prove this I did a clean install. Fixed hosts and then ran the mount and showmount commands as above and they worked fine.

I am looking for technical criticism of the following paper. Whats wrong?

What is NFS?
NFS stands for network file system. It is composed of a server and client component. The server component exports a local directory so it can be mounted (seen) by other Linux (or Unix) systems. If you only have one Linux machine and want to share its directories you probably want Samba instead of NFS.
It is similar to file sharing in Windows but different in many ways including the following:
1.      There is no browsing. To see an exported directory you have to know the host name and the directory/
2.      The path to this share is from your own root path. You need to know the server’s host name and the shared directory path to mount (connect) it. Once mounted it is accessed as if it was a local directory.
3.      A share is referred to as an exported directory.

Assumed Environment
Red Hat 6.1

Server Setup
If you are building a server and plan on exporting directories select the NFS Server package during install. If you have an existing install you can install the NFS server e following commands:
1.      mount /mnt/cdrom
2.      cd /mnt/cdrom/RedHat/RPMS
3.      rpm –Uvh knfsd-1.4..7-7.rpm
If you are not sure if you have nfs server installed do the following command:
find /usr/sbin -name exportfs
If the exportfs file is not present you need to install the package
 
vi /etc/exports
Add a line similar to the following:
/home/public      192.168.1.0/255.255.255.0(rw)
The /home/public is the directory to export
The 192.168.1.0/255.255.255.0 means allow access to the whole subnet
You many put only one ip address to limit access to one host.
The (rw) means grant read write rights.

/etc/rc.d/init.d/nfs start
If you want it to start on bootup run:
Setup then select system services and turn on nfs and nfslock

Client setup
The client portion of nfs is installed by default.
From a client you can mount the exported directory with the following command
mount hostname:/home/public /mnt
hostname is the name of the computer with the exported directory
What follows is the path to the exported directory
The /mnt is where on your system you are going to mount the contents of the /home/public directory from the nfs server. Notice that you will not see a directory public under /mnt in the above example. You will see the contents of /home/public from the nfs server. If you want to see a folder public you have to do the following:
Mkdir /mnt/public
mount hostname:/home/public /mnt/public
To disconnect type:
umount /mnt/public
Hostname has to resolve to the ip address of hostname for the above command to work.
Vi /etc/hosts
Add a line like the following
xxx.xxx.xxx.xxx      nfs-server.domain-name.com  nfs-server

man exports give more information on the exports file.
Man nfs give more information on nfs
There is a nfs how-to that goes into more detail.

Showmount  nfs-server-host-name will show who is connected to the exported directory.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now