Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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
Suraj K Sankari
Honored Contributor

Re: NFS mounting

Hi,
Did you solved your problem or not ?
Suraj
jeevanandham
Frequent Advisor

Re: NFS mounting

Hi thanks for your help but i not able to solve the problem here is what i have done..
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
_____________________________________________
entry in fstsb
root@osshp13:/#more /etc/fstab
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /opt vxfs delaylog 0 2
/dev/vg00/lvol5 /tmp vxfs delaylog 0 2
/dev/vg00/lvol6 /usr vxfs delaylog 0 2
/dev/vg00/lvol7 /var vxfs delaylog 0 2
/dev/vg00/sachin /users/sachin vxfs rw,suid,largefiles,delaylog,datainlog 0 2
/dev/vg01/shahab /shahab vxfs delaylog 0 2
/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
root@osshp13:/#
now --- /shabadi is the filesystem need to mount
Suraj K Sankari
Honored Contributor

Re: NFS mounting

Hi,

Are you able to ping or rlogin into the 135.254.229.180 server.

Did you add 135.254.229.180 host into your clients /etc/hosts file?

Suraj
jeevanandham
Frequent Advisor

Re: NFS mounting

Hi i have done everything i am able to ping and rlogin by using ipaddress but not with hostname.. see below output;
root@osshp13:/#ping 135.254.229.180
PING 135.254.229.180: 64 byte packets
64 bytes from 135.254.229.180: icmp_seq=0. time=0. ms
64 bytes from 135.254.229.180: icmp_seq=1. time=0. ms
64 bytes from 135.254.229.180: icmp_seq=2. time=0. ms
64 bytes from 135.254.229.180: icmp_seq=3. time=0. ms
64 bytes from 135.254.229.180: icmp_seq=4. time=0. ms
â ¥
----135.254.229.180 PING Statistics----
5 packets transmitted, 5 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
root@osshp13:/#rlogin 135.254.229.180
Please wait...checking for disk quotas
(c)Copyright 1983-2000 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2000 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1991-2000 Isogon Corporation, All Rights Reserved.


RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.

Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.


regds ,,,
jeeva
Suraj K Sankari
Honored Contributor

Re: NFS mounting

Hi Jeeva,
>>i am able to ping and rlogin by using ipaddress but not with hostname.

Add this line into your /etc/hosts file

hostname 135.254.229.180

save the file now ping with hostname or login with hostname

Suraj