1834220 Members
2658 Online
110066 Solutions
New Discussion

Regarding NFS

 
SOLVED
Go to solution
Kavita Poonia
Regular Advisor

Regarding NFS

Hello there,

I have to mount one NFS from one server to another with rsize=32768, wsize=32768, then what command should I use.

Thanks a lot !
11 REPLIES 11
Safarali
Valued Contributor
Solution

Re: Regarding NFS

hi Kavita

first you have to mention the directory in /etc/exports
then you have to export it

exportfs -a /directory

from client you can mount the dirctory
make sure nfs is running on both server
if you have any question please let me know

Regards
Safar

Yogeeraj_1
Honored Contributor

Re: Regarding NFS

hi kavita,

On a HP-UX server, you can simply add a similar line in your /etc/fstab:
srv2:/dir1 /mnt/srv2/dir1 nfs rw,suid 0 0

In fact, flags below are implemented by default:
Flags: vers=3,proto=tcp,auth=unix,hard,intr,link,symlink,devs,rsize=32768,wsize=32768,retrans=5


You can see this by running command:
nfsstat -m


On a Linux server, you add the line as follows:
srv2:/dir1 /mnt/srv2/dir1 nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 0 0


hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Regarding NFS

hi again,

Sorry, i think i made an omission. The default is not the same for hp-ux 11.0 and after 11.0.

HP-UX 11.0 does not use 32768 as the default read/write size. It uses 8K. HP-UX releases after 11.0 (11.11 and 11.23) do use 32768 as the default but 11.0 still uses 8K as the default read/write size if you do not specify.

In fact, HP-UX 11.0 uses UDP/PV3/8K by default unless you enable TCP support, at which time TCP becomes the default.

Question:
Which version of HP-UX do you have?


see:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=985769

and also:
http://docs.hp.com/en/5991-1153/index.html


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Regarding NFS

hi again Kavita,

the mount options are summarized here:

http://docs.hp.com/en/5992-0715/ch02s03.html#bghdijij



hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Kavita Poonia
Regular Advisor

Re: Regarding NFS

Thanks a lot Safarali !
It helped a lot.

Thanks a lot Yogeeraj for your efforts. I have HPUX11.11 version. So the default rsize and wsize of 32768 will come autopmatically but what should I do in case of HPUX11.00 version to get the rsize and wsize of 32768.

Again thanks a lot guys !
Yogeeraj_1
Honored Contributor

Re: Regarding NFS

>but what should I do in case of HPUX11.00 version to get the rsize and wsize of 32768.

The syntax is:
server:remote_directory local_directory nfs defaults 0 0

or

server:remote_directory local_directory nfs option[,option...] 0 0


Therefore, you will have to amend the fstab entry accordingly. e.g.

srv2:/dir1 /mnt/srv2/dir1 nfs rsize=32768,wsize=32768,tcp 0 0


hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Sajjad Sahir
Honored Contributor

Re: Regarding NFS


Dear kavihta
make an entry in /etc/exports file in server1
eg:/home/sajjad/file1

use exportfs -a command for exporting

once u exported file u can see
it by using
showmount command
then server2
make a directory
eg:tmp1
thne mount
mount server1:/home/sajjad/file1 /tmp
cd tmp
u can see file there
thanks and regards
sajjad
Kavita Poonia
Regular Advisor

Re: Regarding NFS

Thanks a lot Yogeeraj for the details you have provided....that means I have to specify options instead of writing "defaults" in /etc/fstab. This is really great and very helpful.


Kavita Poonia
Regular Advisor

Re: Regarding NFS

Hey hi Sajjad,

Thanks a lot for making me understand the whole procedure but I just wanted to know about defining rsize and wsize=32768 in case of HP-UX11.00 version. But the whole procedure was really helpful.....it has refreshed my concepts.
Sajjad Sahir
Honored Contributor

Re: Regarding NFS

dear Kavitha

I thin now u got concept about it
how to define in /etc/exports file and /etc/fstab file etc...
in /etc/fstab file u can see
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
/dev/vg00/u01 /u01 vxfs rw,suid,largefiles,delaylog,datainlog 0 2
/dev/vg01/u02 /u02 vxfs rw,suid,largefiles,delaylog,datainlog 0 2
data2:/u03 /u03 nfs rw,suid 0 0

see lvol1
this one has to mount at the mount point /stand and file system type hfs defauls means r/w and 5ht column is future reference and the last column is in which order fsck has to check
what i mean is if u want to mount file system permanently u should have to make an entry in /etc/fstab file.
now i think u can understand entries present in the /etc/fstab file and also how to make an entry in /etc/fstab
thanks and regards

sajjad
Kavita Poonia
Regular Advisor

Re: Regarding NFS


Hey hi Sajjad,

Yes, now I have understood the whole concept and about entries present in /etc/fstab too.Thanks a lot for all your efforts.


Thanks and regards,
Kavita