Solved

how to mount file system using nfs

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

770 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