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

Coly Li coly.li at suse.de
Mon May 18 01:12:30 PDT 2009



Joel Becker Wrote:
> 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 :-)
> 
I see. The 2MB heartbeating slot room is big enough for 512 nodes.

>> - 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.
> 
So what I guessed is correct ;)

>> - 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.
> 
It seems the writing on end is not ocfs2 related, but can avoid md tools to
recognize ocfs2 volume (formated from a pv) as a physical volume. Now I get the
point.

Thanks for the replying :)

-- 
Coly Li
SuSE Labs



More information about the Ocfs2-tools-devel mailing list