[rhn-users] RHEL3 ES- NFSSVC_MAXBLKSIZE

Raj Kumar rajkum2002 at rediffmail.com
Thu Jan 13 00:08:15 UTC 2005


  How to increase the maximum [rw]size NFS server supports from 8k to 32k?

First verify the maximum [rw]size of NFS server by checking the NFSSVC_MAXBLKSIZE, found in the Linux kernel source file ./include/linux/nfsd/const.h. If it is defined as "#define NFSSVC_MAXBLKSIZE (8*1024)", change that to #define NFSSVC_MAXBLKSIZE (32*1024) and recompile the kernel. 
[root at raj nfsd]# grep NFSSVC_MAXBLKSIZE const.h 
#define NFSSVC_MAXBLKSIZE      (8*1024)
[root at raj nfsd]# 

After compiling and booting with the new kernel check NFS server supports 32k block size by mounting an export point: 
[root at raj nfsd]# mount -o rsize=32768,wsize=32768 127.0.0.1:/home /mnt/win1                    
[root at raj nfsd]# cat /proc/2868/mounts                                                        
rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
/proc /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
none /dev/pts devpts rw 0 0
/dev/hda7 /home ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
127.0.0.1:/home /mnt/win1 nfs rw,v3,rsize=32768,wsize=32768,hard,udp,lock,addr=127.0.0.1 0 0

2868- pid of nfsd. Use the following command to find pid of nfsd.
ps-aux | grep nfsd

If the server doesn't suppor 32k block size, mount command with [rw]size 32k will simply succeeds. NFS client uses the max size supported by NFS server. Easy wa to verify it is using the /proc file system as shown above. 



On Wed, 05 Jan 2005 Raj  Kumar wrote :
>Thanks Vindoh for replying to my question!
>
>I will add the options to /etc/fstab as you mentioned. But is const.h the only file I should change to make the NFS server support 32K size? Is there an easy way to verify if the NFS server is indeed serving NFS clients with 32K? Should I also modify const.h on all NFS client machines also? I'm using RHEL3 and the kernel version is 2.4.21-27.0.1.ELsmp. It looks like this patchset didn't make it into kernel version until 2.4.27-xx or so. Is it true?
>
>Thanks again!
>Raj
>
>On Wed, 05 Jan 2005 Vinodh Cuppu wrote :
> >On 01/04/2005 10:38 PM, Raj Kumar wrote:
> >
> >>What changes have to be made to enable 32K rsize/wsize for both NFS Server and Client?
> >>
> >>with only this change made
> >>to the file /usr/src/linux-2.4/include/linux/nfsd/const.h:
> >>
> >>NFSSVC_MAXBLKSIZE = 32*1024 (instead of 8*1024)
> >>
> >>and compiling kernel suffice?
> >>
> >>Does both NFS server and client support 32k rsize/wsize or only NFS client?
> >>
> >Add "rsize=32768,wsize=32786" to the options portion of the mount in /etc/fstab, like the following
> >
> >machine:/export_dir  /nfs_mount                  nfs     other_options,rsize=32768,wsize=32786           0 0
> >
> >_______________________________________________
> >rhn-users mailing list
> >rhn-users at redhat.com
> >https://www.redhat.com/mailman/listinfo/rhn-users
>_______________________________________________
>rhn-users mailing list
>rhn-users at redhat.com
>https://www.redhat.com/mailman/listinfo/rhn-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20050113/d9668826/attachment.htm>


More information about the rhn-users mailing list