linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janek Kozicki <janek_listy@wp.pl>
To: linux-raid@vger.kernel.org
Subject: Re: stride / stripe alignment on LVM ?
Date: Sat, 3 Nov 2007 21:21:18 +0100	[thread overview]
Message-ID: <20071103212118.5fd4c770@absurd> (raw)
In-Reply-To: <1194115248.25553.59.camel@firewall.xsintricity.com>

Doug Ledford said:     (by the date of Sat, 03 Nov 2007 14:40:48 -0400)

> so you really only need to align the
> lvm superblock so that data starts at 128K offset into the raid array.

Sorry, I thought that it will be easier to figure this out
experimentally - put LVM here or there, write 128k of data to the
disc (inside LVM partition), then see (with hexedit) if this data is
really split across several discs or not.

In fact I even managed to find where LVM superblock starts inside
RAID, the problem for me was that I wasn't sure where it ends, and
where the actual data, starts, and *THAT* data has to be aligned on
128K offset. Now I know that I should simply look more carefully at
LVM manuals, to see exactly what is the size of LVM superblock.

So I was unable to do that simple 128k test like that:

# dd if=./128k_of_0xAA of=/dev/lvm_raid5/test

then looking for 128k(or 64k or 32k) of 0xAA on hda3 and sda3. 
But most of the time was spent searching the search pattern
(scanning the disc). So my efficiency was low, and in fact I should
have simply used a smaller test partitions (eg. hda4, sda4 with
just 20MB), so scanning would be faster.

With smaller test partitions perhaps I'd have enough time to overcome
the main difficulty - dealing with degraded array (and encoded data).

Possibly I'll try this next time when I'll buy fourth disc to the
array (next year), so I'll be able to have two degraded arrays
of two discs at the same time. Then I could use LVM again and 
"dd" all data from old array to new one, then grow the new array
to use all 4 HDDs.

Currently I just formatted /dev/md1 with ext3, without LVM.

Thanks, I got to remember that in 1.1 the superblock is on the front.
And I shouldn't forget about the bitmap either :)

> If you run mdadm -D /dev/md1 it will tell you the data offset
> (in sectors IIRC).

Uh, I don't see it:

backup:~# mdadm -D /dev/md1
/dev/md1:
        Version : 01.01.03
  Creation Time : Fri Nov  2 23:35:37 2007
     Raid Level : raid5
     Array Size : 966807296 (922.02 GiB 990.01 GB)
    Device Size : 966807296 (461.01 GiB 495.01 GB)
   Raid Devices : 3
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Sat Nov  3 20:59:06 2007
          State : active, degraded
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 128K

           Name : backup:1  (local to host backup)
           UUID : 22f22c35:99613d52:31d407a6:55bdeb84
         Events : 39975

    Number   Major   Minor   RaidDevice State
       0       3        3        0      active sync   /dev/hda3
       1       8        3        1      active sync   /dev/sda3
       2       0        0        2      removed


thanks again for all your helpful responses!
-- 
Janek Kozicki                                                      |

  reply	other threads:[~2007-11-03 20:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01  9:10 stride / stripe alignment on LVM ? Janek Kozicki
2007-11-01 23:27 ` Neil Brown
2007-11-02 13:01   ` Bill Davidsen
2007-11-02 22:16     ` Janek Kozicki
2007-11-03 18:40       ` Doug Ledford
2007-11-03 20:21         ` Janek Kozicki [this message]
2007-11-04  1:02           ` Doug Ledford
2007-11-07  9:00           ` Goswin von Brederlow
2007-11-11 23:53             ` Alasdair G Kergon
2007-11-07  9:04   ` Goswin von Brederlow
2007-11-02 12:10 ` Michal Soltys

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=20071103212118.5fd4c770@absurd \
    --to=janek_listy@wp.pl \
    --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).