linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
To: ap23563m@gmx.com
Cc: linux-raid@vger.kernel.org
Subject: Re: Alignment of RAID on specific boundary
Date: Tue, 5 Jan 2010 15:02:04 +0200	[thread overview]
Message-ID: <7b3edae11001050502x69afeab8t57d704af0cd7ce30@mail.gmail.com> (raw)
In-Reply-To: <13153813.Bnqmn4ZX5I@rnqqfki.eternal-september.org>

2010/1/5 Michal Soltys <soltys@ziu.info>:
> Michael Evans wrote:
>
> Regarding lvm, you can use --dataalignment and --metadatasize for that
> purpose. Recent lvm versions, when creating directly on md raid (and
> assuming recent kernel), should align themselves automatically:
>
> http://www.redhat.com/archives/linux-lvm/2009-September/msg00092.html
>

Yes, i used the latest lvm and it aligned correctly automatically. I am
interested in aligning the RAID itself.

2010/1/5 Antonio Perez <ap23563m@gmx.com>:
>> I have read this post and it is very good but it mentions alignment
>> of the partitions using special CHS values and LVM/ext4 options.
>
> Yes, and that seems to be the only way to align partitions to a 128k
> boundary. You do need to use such rules to create aligned partitions.
>
> Then, you need to align RAID created from such partitions to 128k Blocks, by
> setting the chunk-size to 128k: "mdadm --chunk=128k" ( well, a multiple of
> that, anyway ).
>
> And, then, align LVM ( with the --dataalignment option for pvcreate ) and
> the Filesystem ( with the -E stripe-width= to the mkfs command ) to such
> boundaries as well. That applies to ext3 AND ext4 filesystems AFAIK.
>

These non-default CHS values are used with MBR partitioning scheme
to make aligning easy. fdisk (when it is ran without the -u option) aligns
partitions on a cylinder boundary and because the cylinder size is a multiple
of 128K all the partitions (except the first) are automatically aligned.
But i use GPT so i don't need them. If you read my original post i manually
created the partitions to be aligned with 128K.

As for the RAID, i chose the default 512K chunk which is multiple of 128K
so this is fine too. But i read in the "mdadm -E" output that there is a
"136 sectors data offset". If i understand this correctly the start of the
md device is 136 sectors from the start of the underlying partition. This
breaks the alignment with the partition and all correct alignments on top
of RAID.

There is of course possibility that i didn't understand it correctly and
this "data offset" means something else. Mr. Brown can clariffy that.

Thank you again for your time.

  reply	other threads:[~2010-01-05 13:02 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 [this message]
2010-01-05  6:57 ` Michael Evans
2010-01-05  7:50   ` Michal Soltys
2010-01-05 13:44   ` Khelben Blackstaff
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=7b3edae11001050502x69afeab8t57d704af0cd7ce30@mail.gmail.com \
    --to=eye.of.the.8eholder@gmail.com \
    --cc=ap23563m@gmx.com \
    --cc=linux-raid@vger.kernel.org \
    /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).