Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to mount file system using nfs

Posted on 2007-11-23
4
Medium Priority
?
2,493 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 22

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 750 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

597 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