linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
To: Michael Evans <mjevans1983@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Alignment of RAID on specific boundary
Date: Tue, 5 Jan 2010 15:44:10 +0200	[thread overview]
Message-ID: <7b3edae11001050544p4f99d7dbq83b72e385151c27@mail.gmail.com> (raw)
In-Reply-To: <4877c76c1001042257h49103054t977de11410eb65c6@mail.gmail.com>

2010/1/5 Michael Evans <mjevans1983@gmail.com>:
> On Mon, Jan 4, 2010 at 11:30 AM, Khelben Blackstaff
> <eye.of.the.8eholder@gmail.com> wrote:
>
> You want the RAID data chunks aligned so that they start on a 512byte
> sector address that fulfills (sector & 0xFF) == 0.
>
> Format 1.1 will reserve the space at the beginning, and I have just checked;
>
> 00000400  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> *
> 00003000  (LVM2 header)
>
> It starts the LVM2 header after 0x3000 bytes (64K chunk size); I'd
> hope to see it around 0x10000.
>
> It looks like the data isn't padded up to the desired offset.
>
> I agree, it would be useful to have an option to specify the offset of
> the first data chunk.
>

Thank you for bringing hexdump to my attention. I had completely
forgot to run it. After reading your post i thought to run hexdump too.

I wrote 10MB of 1s (0x31 in HEX) to both partitions. So "0x31"
means "space untouched by mdadm". Then created the array
and wrote 10KB of 2s (0x32) to it. So "0x32" means "actual data".
The hexdump output is the following:

0000110 FFFF FFFF FFFF FFFF
*
0000400 3131 3131 3131 3131
*
0011000 3232 3232 3232 3232

The data written by mdadm (the superblock i guess) ends at 0x400
like you posted. So the v1.1 raid superblock has 1K size i guess.
In my case the payload starts at 0x11000 (the space between 0x400
and 0x11000 is maybe where the bitmap lives ?)

0x11000 = 69632 bytes = 136 sectors

Then my understanding of "data offset" is correct. I need to move
this offset from 136 sectors to 512 sectors.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-01-05 13:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 19:30 Alignment of RAID on specific boundary Khelben Blackstaff
2010-01-04 21:14 ` David Rees
2010-01-04 21:51   ` Khelben Blackstaff
2010-01-05  8:24     ` Antonio Perez
2010-01-05 13:02       ` Khelben Blackstaff
2010-01-05  6:57 ` Michael Evans
2010-01-05  7:50   ` Michal Soltys
2010-01-05 13:44   ` Khelben Blackstaff [this message]
2010-01-05 15:35     ` John Robinson
2010-01-06  1:46       ` Michael Evans
     [not found]         ` <7b3edae11001060500g2d63f2cav81bf8a90fc0b946b@mail.gmail.com>
2010-01-06 14:44           ` Khelben Blackstaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b3edae11001050544p4f99d7dbq83b72e385151c27@mail.gmail.com \
    --to=eye.of.the.8eholder@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mjevans1983@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).