[Ocfs2-tools-devel] some questions for mkfs.ocfs2 18/5

Joel Becker Joel.Becker at oracle.com
Mon May 18 01:00:18 PDT 2009


On Mon, May 18, 2009 at 03:11:56PM +0800, Coly Li wrote:
> Hi,
> 
> These days, when I read code of mkfs.ocfs2, there are some questions (just
> beginning) which I can not understand. I post the questions here, wish someone
> can help me.
> 
> - is 2MB for heart beat device is enough ?
>   from mkfs.ocfs2/mkfs.c line 1266, as bellow
>       if ((ret * blocksize) > (2 * 1024 * 1024)) {
>   is seems 2MB size of heart beat device is enough. I don't know how this number
> is from. And for large number of nodes in cluster, e.g. 128 nodes, is the size
> still enough ?

	When heartbeating to the volume, we use one sector for each
slot.  That can be 4K on s390.  Then we add some wiggle room :-)

> - what is specified_size_in_blocks for ?
>   Is it the size (in blocks) specified by parameters to mkfs.ocfs2, which can
> overwrite the default volume size in blocks ?

	It's the size specified on the command line, IIRC.

> - why writes 1MB to both head and end of a volume ?
>   I can understand writing the CLEAR_CHUNK bytes to volume head. Is there
> anything valuable to be escaped in the end of the volume ?

	Well, software raid (md driver) puts its superblock at the end
of the volume.  That's one.

Joel

-- 

"There is shadow under this red rock.
 (Come in under the shadow of this red rock)
 And I will show you something different from either
 Your shadow at morning striding behind you
 Or your shadow at evening rising to meet you.
 I will show you fear in a handful of dust."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list