Solved

how to mount file system using nfs

Posted on 2007-11-23
4
2,478 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

706 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