1833883 Members
1773 Online
110063 Solutions
New Discussion

Re: NFS help

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

NFS help

Hi,

It would be appreciated if someone help with nfs setup:

I would have two unix servers linked with some directories, so that I can copy large files over easily. One server is hpux 10.20, the other is 11i. I see something on SAM, but don't know the steps.

Your help is very grateful.

Steven

Steve
3 REPLIES 3
linuxfan
Honored Contributor
Solution

Re: NFS help

Hi Steven,


Look at the doc
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B1031-90048/B1031-90048_top.html&con=/hpux/onlinedocs/B1031-90048/00/00/6-con.html&toc=/hpux/onlinedocs/B1031-90048/00/00/6-toc.html&searchterms=configuring%7cNFS&queryid=20011005-092006

If you want quick setup steps,

Edit /etc/rc.config.d/nfsconf
Make sure NFS_SERVER=1 and NFS_CLIENT=1

If it was already 1 you don't need to bounce the nfs daemons, if not you will have to (restart) bounce the nfs daemons /sbin/init.d/nfs.server stop|start and /sbin/init.d/nfs.client stop|start

On the server(host1) where you want to export filesystems, create a file /etc/exports
(since you only want to copy files)

eg:
/opt1 -ro=host2

where opt1 is the filesystem you want to copy and host2 is the (client)server where you want to copy the files.
Save it.
Run "exportfs -a" on host2

Now on host1
mkdir /myopt1
mount host2:/opt1 /myopt1

Here /myopt1 is just a temporary mountpoint, you can create anything here and mount the filesystem.

There are lots of options to /etc/exports file, you can look at the manpage for that.

Let me see if i can find an HP doc for step-by-step procedure on this.

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sridhar Bhaskarla
Honored Contributor

Re: NFS help

Steven,

srcsystem: server where the files are residing in a directory /srcdir

dstsystem: server to which we need to copy the files into the directory /dstdir.

Make sure you have NFS server enabled on srcsystem.

Edit /etc/rc.config.d/nfsconf and make NFS_SERVER=1

Run /sbin/init.d/nfs.server start

Now edit the file /etc/exports and place this entry

/srcdir -ro;access=dstsystem

Then do

exportfs -a

Now logon to dstsystem

#mkdir /tmpdir
#mount srcsystem:/srcdir /tmpdir

Now you can use cp or tar or cpio to copy the file from /tmpdir to /dstdir

#cp /tmpdir/file1 /dstdir/

Once the copy is done, then you need to unmount

#umount /tmpdir

Go to srcsystem and unexport.

Edit /etc/exports file and take out the entry

#exportfs -au

If you don't want to use NFS later,

Edit /etc/rc.config.d/nfs.server and make NFS.SERVER=0

Run /sbin/init.d/nfs.server stop


-Sri


You may be disappointed if you fail, but you are doomed if you don't try
linuxfan
Honored Contributor

Re: NFS help

Hi Steven,


There's an HP doc on setting up NFS KBRC00002960

I am attaching it for your convenience


-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates