Search Our Articles and Products

Go Back   Computer Care Center Tech Forum > Operating Systems and software > Software's Place of Prime
User Name
Password
Register Search Today's Posts Mark Forums Read


Reply
 
Search this Thread
Old 08-25-2008, 04:46 AM
enrique1985 enrique1985 is offline
PC Wizard
 
Join Date: May 2008
Posts: 1,470
Post Q: the questions of share directory in solaris!


A: share and mount commands

These are two commands used a lot by system adminstrator, share command is uesed to share the directories on local machine, then other UNIX systems could use it; mount command is used to connect the directories that shared from other UNIX systems to the local connection points, and finally to make use of the resources of other UNIX systems. Such as:
   On machine A, keyed machineA# share -F nfs -o rw /share-dir
  On machine B, keyed machineB# mount -F nfs machineA:/share-dir /mount-point

The first command shares the share-dir directory of machine A and the shared authority is accessible’
The second command connects the shared directory of machine A to the directory mount-point of machine B.
After finishing these two commands, on machine B users could operate the directory share-dir of machine A by accessibility to mount-point.
But sometimes when we process, on machine B after executing the mount command, error “RPC: Program not registered” would return back. This is because the machine A lacks mountd and nfsd two watch processes (daemons).. When UNIX system starts, system would auto test the file /etc/dfs/dfstab, if there’s shared resource in the file, then you have to start these two watch processes, contrariwise, not to start them. Therefore, if there’s no content in /etc/dfs/dfstab, then system could not start the two watch processes mounted and nfsd, and the shared directory by share command could not be really shared by system.

Actually the solutin for it is really simple, we could put the directories we want to shard into /etc/dfs/dfstab, then next time when system starts, the directory would be shared automatically; besides, we could manually start these watch processes. First is to log in with supervisor (root), and then enter the commands in command line:
machine_A# /etc/rc3.d/S15nfs.server start
or to type:
     machine_A# /usr/lib/nfs/mountd
        machine_A# /usr/lib/nfs/nfsd -a 16
then you could start these two processes.
After this, the directory could be shared, and then use mount comnmand on machine B to connect the directory of machine A to itself.
Remove share use: unshare -F nfs /data

NFS, network file system, the protocol used to share files by NUIX system directly.
NFT server: provides the system of network shared resource.
NFS client: use network shared resource.

When client sends a NFS request, the articulated process would contact articulated watch process (/usr/lib/nfs/mountd). Local articulated process would write articulated information to the file /etc/mnttab. Once client finishes NFS articulated request, the articulated information would be written into the file /etc/rmtab in server. When client uninstalls NFS shared resource, these information would be deleted from the file.

NFS server watch process
When client tries to access remote shared resources, NFS server’s watch process (/usr/lib/nfs/nfsd)response the request and return data. Server watch process is produced by /etc/init.d/nfs.server. if there’s shared contents in the file /etc/dfs/dfstab, these shared directories would auto share when watch process starts.
Client NFS watch process
There’re two watch processes on client, /usr/lib/nfs/statd and /usr/lib/nfs/lockd. They auto run when system enters running level 2.

# more /etc/dfs/dfstab
# Place share(M) commands here for automatic execution
# on entering init state 3.
#
# Issue the command '/etc/init.d/nfs.server start' to run the NFS
# daemon processes and the share commands, after adding the very
# first entry to this file.
#
# share [-F fstype] [ -o options] [-d ""] [resource]
# e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2

Share command
share [ -F FSType ] [ -o options ] [ -d description ] pathname
Parameters:
- F FSType specify the type of file system. If the default remote file of /etc/dfs/fstypes is of NFS, then you don’t have to specify.
- - o options: controls the authority if client could access NFS shared resources.
- -d description: the description of the shared resources.
- Pathname: the resources to share

Unshared command
unshare [ -F nfs ] pathname

Dfshares command
Used to check the shared resources of server.

# dfshares
RESOURCE SERVER ACCESS TRANSPORT
venus:/usr/share/man venus - -
#dfshares mars
RESOURCE SERVER ACCESS TRANSPORT
mars:/export mars - -

Dfmounts command
Check the used situation of the shared resource on server.

# dfmounts
RESOURCE SERVER PATHNAME CLIENTS
- venus /usr/share/man earth, pluto,(anon)

Connect remote network file system.
mount [ -F nfs ] [ -o options ] serverathname mount_point

# mount venus:/usr/share/man /usr/share/man
solaris shared files have root authority -o rw,anon=0

share -F nfs -o rw,anon=0
/export/home/bea_new/wlserver6.1/config/mydomain/applications/DefaultWebAp
Oh, I haven’t talk about how to stop nfsd and mountd, these watch processes. Here I make up:
With root authority: #/etc/init.d/nfs.server stop NFS
To use #/etc/init.d/nfs.server start NFS is to restart process
 

Reply With Quote
Old Advertise
#2    
Old 01-08-2010, 05:25 AM
Doriax Doriax is offline
Rookie
 
Join Date: Jan 2010
Posts: 2
Send a message via MSN to Doriax Send a message via Skype to Doriax
Default What are the Best Forex Trading Platforms in internet?

I am a forex trader and interested to trade forex for banks, coporations and individuals .Anyone can help me?
best forex software
Reply With Quote
#3    
Old 01-08-2010, 08:28 AM
luther luther is offline
Rookie
 
Join Date: Jan 2010
Posts: 7
Default reply to share directory in solaris

hey enrique....thanks buddy for sharing this IT-stuff with us here....
actually this was as a practical in our lab session of unix at one time.....though i haven't remember this all......this been cool...!
Reply With Quote
Reply


Similar Threads
Some questions about Solaris
Solaris Q&A 1. Solaris dial-up ADSL, plz, help, give me a standard solution for it?
Use BAT batch file to auto create software class directory
Q: two questions?
Window Vista could not be installed? Three most common questions
Most Popular
Using the Motherboard "Clear CMOS" Jumper
HARD DRIVE Unlock Wizard
How to install IPX/SPX protocol in Vista to handle online game connection problem?
After Install Windows XP on Toshiba Satellite U300 laptop
How to install Windows XP on TOSHIBA X205-S7483 laptop?
Highest Rating
Delete extra Windows Vista startup menu
Q: the questions of share directory in solaris!
How to record your game play video on pc?
Troubleshooting Device Conflicts with Device Manager
Security Systems Guide
New Articles
adobe flash player 9 audio
How to solve the problem that HP laptop cannot open “My Computer” or folders?
Explanation for Windows 7 system processes
Toshiba laptop BIOS Setup problems
Android 2.2 Flash Player 10.1 Beta Available for Download

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

 

About Us | Terms & Conditions | Privacy Policies | Employment | Tech Forum | FAQs | Site Map| e Book| Link to Us

Copyright © 1995-2010 Computer Care Center  
vBulletin v3.5.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.