1753411 Members
7166 Online
108793 Solutions
New Discussion юеВ

Re: NFS mounting

 
SOLVED
Go to solution
jeevanandham
Frequent Advisor

NFS mounting

Hi i am new to UNIX ,

i want leasrn Nfs, as i have two new servers, how can i configure NFS in that , as i want to share a filesystem to the other server, can anybody help me by guiding to configure NFS and mounting filesystem..

Thanks in advance...
14 REPLIES 14
likid0
Honored Contributor
Solution

Re: NFS mounting

Hy,

Have look at:

Configuring and Administering an NFS Server:
http://www.docs.hp.com/en/5992-0715/ch02s02.html
Windows?, no thanks
Suraj K Sankari
Honored Contributor

Re: NFS mounting

Hi,
Edit the /etc/exports add the entry of exported filesystem.
e.i.

/usr/bin -access=srv1:srv2:srv3,rw=srv3 # read to srv1 and2 read/write to srv3

apply the command
/usr/sbin/exportfs -a

make changes in /etc/rc.config.d/nfsconf

NFS_SERVER=1
START_MOUNTD=1

start the daemons processes using
# /sbin/init.d/nfs.server start

Client

make changes in /etc/rc.config.d/nfsconf

NFS_CLIENT=1

start the daemons processes using

# /sbin/init.d/nfs.client start

mount the file system

Suraj
Avinash20
Honored Contributor

Re: NFS mounting

On the NFS server:
sam =>
Networking and Communications =>
Networked File Systems ->
Exported Local File Systems =>
Go to Action Tab => Add Exported File System ==>
Local-Directory Name:
Select <*> Specify UID for Unknown User
Give User ID: 0
On Permission for File Access
Select " Specify Root-User Access "
Add the NFS client hostname
Click OK and Apply.

The /etc/exports file should be:
cat /etc/exports
-anon=0,root=

sam ==> Add Remote File System => Using NFS
>

ON NFS client:
sam =>
Networking and Communications =>
Networked File Systems ->
Mounted Remote File Systems =>
Go to Action:
Add Remote File System ->Using NFS...

Local-Directory Name: Specify the Local directory where it needs to be mounted
Remote-Server Name:
Remote-Directory Name:

├в When to Mount:
├в [X] Now ├в
├в [X] At System Boot ├в

[ Mount Options... ]
Access Permissions: [├в Read/Write ├в

Click OK
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Ganesan R
Honored Contributor

Re: NFS mounting

Hi Jeeva,

Find the attached file for the steps..

Best wishes,

Ganesh.
jeevanandham
Frequent Advisor

Re: NFS mounting

Hai Ganesh .. thanks for your help.. everything is fine but i am not able to mount the NFS file system getting command error..
root@osshp13:/#mount -v 135.254.229.180: /shabadi /shabadi
usage: mount [-l][-v|-p]
mount [-F FStype][-eQ] -a
mount [-F FStype][-eQrV][-o specific_options]
{ special | directory }
mount [-F FStype][-eQrV][-o specific_options]
special directory
root@osshp13:/#

Here i have given ipaddress of remote server(135.254.229.180)

please giude me further...
Dennis Handly
Acclaimed Contributor

Re: NFS mounting

>mount -v 135.254.229.180: /shabadi /shabadi

You can't use -v with that mount. You shouldn't have a space:
mount 135.254.229.180:/shabadi /shabadi

>Here I have given IP address of remote server (135.254.229.180)

Any reason you are using the IP rather than a name or FQDN?
yulianto piyut
Valued Contributor

Re: NFS mounting

edit file /etc/exports and add the name of directory you want to share, for ex:
/data1 -anon=0
then, run "exportfs -av", then try to mount to other server:
# mount -F nfs /data1 10.x.x.x:/a
jeevanandham
Frequent Advisor

Re: NFS mounting

hai there is some issue with hostname so i am usig ip address..

here in /etc/fstab.i have made entry as follows,,,
/dev/vg01/jeeva /jeeva vxfs delaylog 0 2
/dev/vg01/sujeet /sujeet vxfs delaylog 0 2
/dev/vg01/sanjay /sanjay vxfs delaylog 0 2
135.254.229.180:/dev/vg02/shabadi /shabadi nfs defaults 0 0

and when i give #mount -a

root@osshp13:/#mount -a
nfs mount: get_fh: 135.254.229.180:: RPC: Program not registered
nfs mount: get_fh: 135.254.229.180:: RPC: Program not registered
nfs mount: retry: retrying(1) for: /shabadi after 5 seconds
nfs mount: retry: giving up on: /shabadi
mount: /dev/vg01/sanjay is already mounted on /sanjay

can any one help me...
щ╗ЮчЗГ
Valued Contributor

Re: NFS mounting

Hi Jeevan,

For NFS server:-

1. Edit the /etc/exports file and add entries for exported file systems.
2. Use the exportfs -a command to export these file systems.
3. Edit the /etc/rc.config.d/nfsconf file and set proper values to different variables as mentioned earlier.
4. Execute the /sbin/init.d/nfs.core start command.
5. Execute the /sbin/init.d/nfs.server start command

for NFS client:-

1. Edit the /etc/rc.config.d/nfsconf file to enable an NFS client to be started at boot time.
2. Edit the /etc/fstab file to mount remote file systems at system boot time.
3. Create mount points for the remote file systems.
4. Ensure that the name of the NFS server is present in the /etc/hosts file if NIS or DNS are not being used.
5. Synchronize client and server clocks to ensure that time stamps are correct on modified files.
6. Either reboot the system or start the NFS client and mount remote file systems manually.
7. Verify mounted file systems using the mount command


Regards!
Man's mind, once stretched by a new idea, never regains its original dimensions