1834192 Members
2660 Online
110064 Solutions
New Discussion

NFS

 
SOLVED
Go to solution
Jeff Hagstrom
Regular Advisor

NFS

How do I NFS mount a directory so that 2 different machines an access the directory?
6 REPLIES 6
Byron Myers
Trusted Contributor

Re: NFS

On the server exporting the NFS directory:
place exported directory in /etc/exports. Example: on nfshost /var/mydir -access=host1:host2
This allows only host1 and host1 machines to NFS mount /var/mydir.

ON host1 and host2, edit /etc/fstab to something like: "nfshost:/var/mydir /local/mydir nfs rw,suid,soft,timeo=14 0 0" where nfshost is the hostname of the NFS server above.

Also make sure NFS server is running on "nfshost" and NFS clients are running on "host1" and "host2" above. See /etc/rc.config.d/nfsconf to activate NFS server and client at boot.


If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
Santosh Nair_1
Honored Contributor

Re: NFS

On the NFS server side, make sure NFS_SERVER is set to 1 and make sure the nfs daemons are running. Edit the /etc/exports on this machine and then run exportfs -a

On the NFS client side, make sure NFS_CLIENT is set to 1 and make sure the daemons are running. Then edit /etc/fstab, make the mount point directories and do a mountall.

If all is okay, then the filesystems you exported from the server should be mounted on the client.

-Santosh
Life is what's happening while you're busy making other plans
Jeff Hagstrom
Regular Advisor

Re: NFS

I am getting a Permission Denied message when i try to run # mount -aF nfs .
Sanjay_6
Honored Contributor

Re: NFS

Hi Jeff,

You can configure the NFS Server, NFS client, directory export from NFS server server and Mounting exported directories at the client using SAM.

On the Server from where you want to export the directories which should get mounted by clients, use sam to configure the NFS server server capability and export the directory or filesystem.

On the system you want to mount these directories using Sam enable the NFS Client capability and If you want to mount the direcories automatically at the system boot, add them into /etc/fstab using sam.

If on the other hand you want to mount these direcotories as and when required, use the mount command on the command prompt to mount these directory/directories.

hope this helps.

thanks
A. Clay Stephenson
Acclaimed Contributor

Re: NFS

Hi Jeff:

I suspect what is missing on your NFS clients is the mountpoint. Create a mountpoing via mkdir /remotefs1. The mount -F nfs remote_host:/remote_fs /remotefs1.

You must also edit /etc/rc.config.d/nfsconf on both the clients and the server and set NFS_CLIENT=1 and NFS_SERVER=1. You should make sure that you can resolve hostnames in both directions. You can then start the services manually, via SAM, or simply reboot.

Once you can mount manually, you can then either make /etc/fstab entries on the clients or setup the automounter on the clients.

Clay
If it ain't broke, I can fix that.
Sachin Patel
Honored Contributor
Solution

Re: NFS

Hi
on server: if you are exporting /home
1.edit /etc/exports on server
/home
2.edit /etc/rc.config.d/nfsconf
NFS_SERVER=1
3.start nfs server
#/etc/rc2.d/K900nfs.sever start
4 #exportfs -ev (to export filesystems)

On client
1. cd /
2. mkdir tmp_home
3. edit /etc/rc.config.d/nfsconf
NFS_CLIENT=1
4. start nfs client
#/sbin/rc2.d/S430nfs.client start
5. mount server:/home /tmp_home

man shoumount. useful command.

Sachin
Is photography a hobby or another way to spend $