星期四 四月 03, 2008

Solaris file system overview------NFS


As a classic file
system,NFS played an important part in unix system.In this acticle I
will introduce how to use NFS including configuring NFS server and
client.

NFS Server:

In the console,you can use dfshares to the existing NFS server shared directory.

# dfshares


nfs dfshares:swustcs: RPC: Program not registered

because nfs is based on RPC(Remote procedure call),you must register RPC first,such as the command below:

#/usr/lib/nfs/mountd

Start NFS server(it is active by default):

#svcadm enable network/nfs/server     (you can also stop it by: #svcadm disable network/nfs/server)

 

Set share directory on NFS Server

#share -F nfs -o ro=swustcs /cdrom

 
NFS Client:

In order to share NFS server resource,you must start the nfs service at the client:
list nfs service:

# svcs | grep nfs
online         15:43:28 svc:/network/nfs/rquota:default
online         15:43:29 svc:/network/nfs/mapid:default
online         15:43:29 svc:/network/nfs/status:default
online         15:43:31 svc:/network/nfs/nlockmgr:default
online         15:43:33 svc:/network/nfs/server:default

Check the shared directory:

# showmount -e
swustcs 的导出列表:
/cdrom swustcs

create a directory to mount shared directory:

# mkdir /nfstest

 
mount the shared directory to local directory:

# mount -F nfs swustcs:/cdrom /nfstest

read the directory:

# ls /nfstest
cdrom0      sol_11_x86
# ls /nfstest/sol_11_x86
autorun.inf                  JDS-THIRDPARTYLICENSEREADME
autorun.sh                   License
boot                         README.txt
Copyright                    sddtool
DeveloperTools               Solaris_11
installer
#


umount the shared directory:

# umount /nfstest
# ls /nfstest

 

 

Cai Xiaowu

csqqer@gmail.com
 


About

This is Chinese Functional CA Team Blog. Any suggestion is appreciated.

Search

Archives
« 四月 2014
星期日星期一星期二星期三星期四星期五星期六
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
今天