Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[Patch] RA: nfsserver: Preparing /proc/fs/nfsd first

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


ygao at novell

Jul 27, 2009, 3:14 AM

Post #1 of 6 (1581 views)
Permalink
[Patch] RA: nfsserver: Preparing /proc/fs/nfsd first

Hi,
Attached a patch of nfsserver RA from Xinwei Hu <hxinwei [at] gmail>

Description:
Preparing /proc/fs/nfsd first before starting nfs server

--
Regards,
Yan Gao
China R&D Software Engineer
ygao [at] novell

Novell, Inc.
Making IT Work As One™
Attachments: nfsserver.diff (0.68 KB)


r.bhatia at ipax

Jul 27, 2009, 5:19 AM

Post #2 of 6 (1509 views)
Permalink
Re: [Patch] RA: nfsserver: Preparing /proc/fs/nfsd first [In reply to]

hi,

in your patch, you add the following:

> + if [ -w /proc/fs/nfsd/max_block_size ]; then
> + echo 65536 > /proc/fs/nfsd/max_block_size
> + fi

why are you enforcing max_block_size to 65536?
on my system (debian lenny) i get

> # cat /proc/fs/nfsd/max_block_size
> 262144

please elaborate.

cheers,
raoul
--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. r.bhatia [at] ipax
Technischer Leiter

IPAX - Aloy Bhatia Hava OEG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. office [at] ipax
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


hxinwei at gmail

Jul 27, 2009, 11:36 PM

Post #3 of 6 (1527 views)
Permalink
Re: [Patch] RA: nfsserver: Preparing /proc/fs/nfsd first [In reply to]

Hi,

Here's some explain of this:

The 'wsize' and 'rsize' negotiated between client and server, are affected
by the auto-sized memory available to incoming request to NFS server.
And the size is actually adjusted based on total available memory to the server.

The problem is when the client negotiates a large size, and then the server
fails over to a lower limit. You are likely to get:
"RPC: fragment too large"
And the failing over fails ......

So the idea is to enforce an same configuration everywhere, regardless the
total memory available to the server.

I also re attach the patch for your consideration.
Thanks.

2009/7/27 Raoul Bhatia [IPAX] <r.bhatia [at] ipax>:
> hi,
>
> in your patch, you add the following:
>
>> + 聽 聽 if [ -w /proc/fs/nfsd/max_block_size ]; then
>> + 聽 聽 聽 echo 65536 > /proc/fs/nfsd/max_block_size
>> + 聽 聽 fi
>
> why are you enforcing max_block_size to 65536?
> on my system (debian lenny) i get
>
>> # cat /proc/fs/nfsd/max_block_size
>> 262144
>
> please elaborate.
>
> cheers,
> raoul
> --
> ____________________________________________________________________
> DI (FH) Raoul Bhatia M.Sc. 聽 聽 聽 聽 聽email. 聽 聽 聽 聽 聽r.bhatia [at] ipax
> Technischer Leiter
>
> IPAX - Aloy Bhatia Hava OEG 聽 聽 聽 聽 web. 聽 聽 聽 聽 聽http://www.ipax.at
> Barawitzkagasse 10/2/2/11 聽 聽 聽 聽 聽 email. 聽 聽 聽 聽 聽 聽office [at] ipax
> 1190 Wien 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 tel. 聽 聽 聽 聽 聽 聽 聽 +43 1 3670030
> FN 277995t HG Wien 聽 聽 聽 聽 聽 聽 聽 聽 聽fax. 聽 聽 聽 聽 聽 聽+43 1 3670030 15
> ____________________________________________________________________
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
Attachments: nfsserver.diff (1.08 KB)


r.bhatia at ipax

Jul 28, 2009, 3:42 AM

Post #4 of 6 (1486 views)
Permalink
Re: [Patch] RA: nfsserver: Preparing /proc/fs/nfsd first [In reply to]

hi,

thank you for your explanation.

a few more thoughts:

> +<parameter name="nfs_max_block_size" unique="0" required="1">
> +<longdesc lang="en">
> +Memory available for incoming requests. In bytes.
> +</longdesc>
> +<shortdesc lang="en">
> +/proc/fs/nfsd/max_block_size
> +</shortdesc>
> +<content type="string" default="65536" />
> +</parameter>

Q. is this enough to set a default value for
${OCF_RESKEY_nfs_max_block_size} ? i am asking because in other ra's,
there is a special check like:

: ${OCF_RESKEY_config_dir=""}

at the beginning of the script.


> + ocf_log info "Preparing /proc/fs/nfsd first"
> + if [ ! -f /proc/fs/nfsd/max_block_size ] ; then
> + mount -t nfsd nfsd /proc/fs/nfsd
> + fi

Q. is it necessary to check if /proc/fs/nfsd exists?
Q. shouldn't we check for a failed mount and exit in this case?
Q. is it possible that max_block_size can be found at a different
location. i'm thinking about *bsd/solaris/etc. platforms.

thank you,
raoul
--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. r.bhatia [at] ipax
Technischer Leiter

IPAX - Aloy Bhatia Hava OEG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. office [at] ipax
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


lmb at suse

Jul 29, 2009, 7:16 AM

Post #5 of 6 (1466 views)
Permalink
Re: [Patch] RA: nfsserver: Preparing /proc/fs/nfsd first [In reply to]

On 2009-07-28T12:42:38, "Raoul Bhatia [IPAX]" <r.bhatia [at] ipax> wrote:

> Q. is this enough to set a default value for
> ${OCF_RESKEY_nfs_max_block_size} ? i am asking because in other ra's,
> there is a special check like:
>
> : ${OCF_RESKEY_config_dir=""}
>
> at the beginning of the script.

Good catch, that needs to happen. This is only the default for newly
created resources via the GUI; the CRM shell ignores default settings
as Dejan wrongly disagrees about their usefulness.

> > + ocf_log info "Preparing /proc/fs/nfsd first"
> > + if [ ! -f /proc/fs/nfsd/max_block_size ] ; then
> > + mount -t nfsd nfsd /proc/fs/nfsd
> > + fi
>
> Q. is it necessary to check if /proc/fs/nfsd exists?
> Q. shouldn't we check for a failed mount and exit in this case?

This is specific setup detail for Linux; the code should likely be
skipped on other platforms. Modules may need to be loaded etc. Yes, the
code as above is too trivial and does not contain enough checking.

> Q. is it possible that max_block_size can be found at a different
> location. i'm thinking about *bsd/solaris/etc. platforms.

Other platforms need to have port-specific fixes, which we'll leave to
whomever ports them ;-)



Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N黵nberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Aug 12, 2009, 7:45 AM

Post #6 of 6 (1274 views)
Permalink
Re: [Patch] RA: nfsserver: Preparing /proc/fs/nfsd first [In reply to]

Hi,

On Wed, Jul 29, 2009 at 04:16:35PM +0200, Lars Marowsky-Bree wrote:
> On 2009-07-28T12:42:38, "Raoul Bhatia [IPAX]" <r.bhatia at ipax.at> wrote:
>
> > Q. is this enough to set a default value for
> > ${OCF_RESKEY_nfs_max_block_size} ? i am asking because in other ra's,
> > there is a special check like:
> >
> > : ${OCF_RESKEY_config_dir=""}
> >
> > at the beginning of the script.
>
> Good catch, that needs to happen. This is only the default for newly
> created resources via the GUI; the CRM shell ignores default settings
> as Dejan wrongly disagrees about their usefulness.

You take something out of context from the discussion which is
not available to the general public. And then even deliver the
verdict. IIRC, the discussion was about meta attributes for
actions (such as timeouts) which is a different matter.

At any rate, the defaults for parameters shouldn't be imposed by
the clients (GUI or CLI), but by the other side: either the crmd
or, as it is the case now, resource agents. As Florian Haas
suggested earlier, it would be preferable to have defaults
defined by the crmd.

Thanks,

Dejan

> > > + ocf_log info "Preparing /proc/fs/nfsd first"
> > > + if [ ! -f /proc/fs/nfsd/max_block_size ] ; then
> > > + mount -t nfsd nfsd /proc/fs/nfsd
> > > + fi
> >
> > Q. is it necessary to check if /proc/fs/nfsd exists?
> > Q. shouldn't we check for a failed mount and exit in this case?
>
> This is specific setup detail for Linux; the code should likely be
> skipped on other platforms. Modules may need to be loaded etc. Yes, the
> code as above is too trivial and does not contain enough checking.
>
> > Q. is it possible that max_block_size can be found at a different
> > location. i'm thinking about *bsd/solaris/etc. platforms.
>
> Other platforms need to have port-specific fixes, which we'll leave to
> whomever ports them ;-)
>
>
>
> Regards,
> Lars
>
> --
> Architect Storage/HA, OPS Engineering, Novell, Inc.
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N?rnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.