1833187 Members
2686 Online
110051 Solutions
New Discussion

Re: NFS

 
SOLVED
Go to solution
Stephen Young_1
Occasional Advisor

NFS

Can anyone give me the command line syntax and
list any files I will need to edit
to set up an NFS between two servers.
The NFS is to be permanent
so will require an entry in fstab (I think)

Cheers in advance
7 REPLIES 7
Alex Glennie
Honored Contributor
Solution

Re: NFS

see http://docs.hp.com/hpux/onlinedocs/B1031-90000/B1031-90000.html for full details ?

key files and commands :

Edit /etc/rc.config.d/nfsconf


- Change NFS_CLIENT=1 to NFS_CLIENT=0.
- Change NFS_SERVER=1 to NFS_SERVER=0.

- /sbin/init.d/nfs.server start/stop
- /sbin/init.d/nfs.client start/stop
Alex Glennie
Honored Contributor

Re: NFS

Ooop's got my 1's and 0's the wrong way around !
Robin Wakefield
Honored Contributor

Re: NFS

Hi Stephen,

At a basic level, edit the /etc/rc.config.d/nfsconf file on each machine to tell the system to start the correct server/client processes.

On the server, add the directories you wish to be available for mounting, and run exportfs to enable it.

On the client add an entry to /etc/fstab of the form:

server:/mnt /mnt nfs rw,hard 0 0 #mount from server

All these can be found in the man pages for:

nfs
exports
exportfs
fstab

Of course, there's a lot more to it than that, automounts, direct/indirect maps, etc. but this is the basics.

Rgds, Robin.
Stephen Young_1
Occasional Advisor

Re: NFS

I want to access a filesystem called /exports on a server called ben from a server (client) called bill and mount it it on /steve
would the entry in fstab on bill be.

ben:/exports /steve nfs rw,hard 0 0

What do hard, and 0 0 mean ?

Cheers in advance
Robin Wakefield
Honored Contributor

Re: NFS

Hi Stephen,

"hard" is an option specific to nfs mounts, and it means:

Once the file system is mounted, retry subsequent NFS requests until server responds (default).

It is the default. To see the other possible options, run "man mount_nfs"

The first 0 is ignored (see man fstab), the second tells the system not to bother fsck'ing this filesystem at boot time.

Rgds, Robin.
Sanjay_6
Honored Contributor

Re: NFS

Hi Stephen,

To learn more about the different options you can put in /etc/fstab for mounting a NFS filesystem look at the thread below and look for the section "To Change the Default Mount Options "

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B1031-90048/B1031-90048_top.html&con=/hpux/onlinedocs/B1031-90048/00/00/9-con.html&toc=/hpux/onlinedocs/B1031-90048/00/00/9-toc.html&searchterms=To%20Verify%20Your%20NFS%20Client%20Configuration%20%20&queryid=20011005-061726

Hope this explain all the options you may want to know about.

Thanks