Solved

how to mount file system using nfs

Posted on 2007-11-23
4
2,486 Views
Last Modified: 2013-12-27
I would like to nfs mount a filesystem on one server to another server. What is the command line for this?
0
Comment
Question by:SyedHNaqvi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 20338641
Hi,

The steps in general are

On the server that is having the dir  to mount:

- You need to add the share command to /etc/dfs/dfstab file
e.g. add a line similar to

share -F nfs /dir

- Start the nfs server( /etc/rc3.d/S15nfs.server start )

On the server that will be mounting the remote nfs share

- create the mount dir

e.g.

mkdir /mydir

- mount the file system with the mount command

mount remoteserver:/dir /mydir


remotehost is the name or ip address of the remote nfs server

- add an entry to /etc/vfstab

e.g. add a line similar to

remotehost:/dir - /mydir nfs - no -o ro

For more info please see

http://www.softpanorama.org/Net/Application_layer/nfs.shtml
http://www.unix.org.ua/orelly/networking/tcpip/ch09_01.htm
http://unixarticles.com/articles/9/1/NFS-configuration-for-Solaris-and-AIX
http://www.uwsg.iu.edu/usail/network/nfs/admin.html
0
 
LVL 21

Expert Comment

by:robocat
ID: 20338818

A quick way to mount the remote filesystem using the automounter is:

cd /net/remoteserver/dir

Just by going to this location or using a file on it, the automounter will automatically mount the filesystem. The automounter will also unmount the filesystem when it's no longer used.

You can use this if you don't need a permanent mount.

0
 
LVL 22

Expert Comment

by:blu
ID: 20347987
You don't mention what version of Solaris you are using. The answer is different on Solaris 10 from prior versions of Solaris, and it
is different on OpenSolaris than on Solaris 10.
0
 
LVL 2

Accepted Solution

by:
geoffry earned 250 total points
ID: 20349037
In Server1:
1. * ensure /etc/rc3.d/S15nfs.server started or start it run /etc/rc3.d/S15nfs.server start
* ensure /etc/dfs/dfstab is share something
# vi /etc/dfs/dfstab   ---> add this line into last line
share –F nfs –o ro,anon=0 /cdrom/cdrom0    --> for share CDROM
share –F nfs –o rw,client1:/export/home    --> for share NFS to client1 only

Client1:
# mount -o ro Server1 /cdrom/YourCD /mnt
or,
# mount –F nfs –o ro Server1:/cdrom/YourCD /mnt
or,
# mount –F nfs –o ro Server1_IPaddress:/cdrom/YourCD /mnt

Command to manually mount;
E.g:
# mount -F nfs remotesvr:/export/home/newuser /mnt
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

726 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