linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Berra <bluca@comedia.it>
To: linux-raid@vger.kernel.org
Subject: Re: Time to  deprecate old RAID formats?
Date: Sun, 28 Oct 2007 15:13:36 +0100	[thread overview]
Message-ID: <20071028141336.GC22861@percy.comedia.it> (raw)
In-Reply-To: <1193531160.10336.397.camel@firewall.xsintricity.com>

On Sat, Oct 27, 2007 at 08:26:00PM -0400, Doug Ledford wrote:
>On Sat, 2007-10-27 at 00:30 +0200, Gabor Gombas wrote:
>> On Fri, Oct 26, 2007 at 02:52:59PM -0400, Doug Ledford wrote:
>> 
>> > In fact, no you can't.  I know, because I've created a device that had
>> > both but wasn't a raid device.  And it's matching partner still existed
>> > too.  What you are talking about would have misrecognized this
>> > situation, guaranteed.
>> 
>> Maybe we need a 2.0 superblock that contains the physical size of every
>> component, not just the logical size that is used for RAID. That way if
>> the size read from the superblock does not match the size of the device,
>> you know that this device should be ignored.
>
>In my case that wouldn't have helped.  What actually happened was I
>create a two disk raid1 device using whole devices and a version 1.0
>superblock.  I know a version 1.1 wouldn't work because it would be
>where the boot sector needed to be, and wasn't sure if a 1.2 would work
>either.  Then I tried to make the whole disk raid device a partitioned
>device.  This obviously put a partition table right where the BIOS and
>the kernel would look for it whether the raid was up or not.  I also
the only reason i can think for the above setup not working is udev
mucking with your device too early.

>tried doing an lvm setup to split the raid up into chunks and that
>didn't work either.  So, then I redid the partition table and created
>individual raid devices from the partitions.  But, I didn't think to
>zero the old whole disk superblock.  When I made the individual raid
>devices, I used all 1.1 superblocks.  So, when it was all said and done,
>I had a bunch of partitions that looked like a valid set of partitions
>for the whole disk raid device and a whole disk raid superblock, but I
>also had superblocks in each partition with their own bitmaps and so on.
OK

>It was only because I wasn't using mdadm in the initrd and specifying
>uuids that it found the right devices to start and ignored the whole
>disk devices.  But, when I later made some more devices and went to
>update the mdadm.conf file using mdadm -Eb, it found the devices and
>added it to the mdadm.conf.  If I hadn't checked it before remaking my
>initrd, it would have hosed the system.  And it would have passed all
the above is not clear to me, afair redhat initrd still uses
raidautorun, which iirc does not works with recent superblocks,
so you used uuids on kernel command line?
or you use something else for initrd?
why would remaking the initrd break it?

>the tests you can throw at it.  Quite simply, there is no way to tell
>the difference between those two situations with 100% certainty.  Mdadm
>tries to be smart and start the newest devices, but Luca's original
>suggestion of skip the partition scanning in the kernel and figure it
>out from user space would not have shown mdadm the new devices and would
>have gotten it wrong every time.
yes, in this particular case it would have, congratulation you found a new
creative way of shooting yourself in the feet.

maybe mdadm should do checks when creating a device to prevent this kind
of mistakes.
i.e.
if creating an array on a partition, check the whole device for a
superblock and refuse in case it finds one

if creating an array on a whole device that has a partition table,
either require --force, or check for superblocks in every possible
partition.

L.
-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

  reply	other threads:[~2007-10-28 14:13 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 14:34 Time to deprecate old RAID formats? John Stoffel
2007-10-19 15:09 ` Justin Piszcz
2007-10-19 15:46   ` John Stoffel
2007-10-19 16:15     ` Doug Ledford
2007-10-19 16:35       ` Justin Piszcz
2007-10-19 16:38       ` John Stoffel
2007-10-19 16:40         ` Justin Piszcz
2007-10-19 16:44           ` John Stoffel
2007-10-19 16:45             ` Justin Piszcz
2007-10-19 17:04               ` Doug Ledford
2007-10-19 17:05                 ` Justin Piszcz
2007-10-19 17:23                   ` Doug Ledford
2007-10-19 17:47                     ` Justin Piszcz
2007-10-20 18:38                       ` Michael Tokarev
2007-10-20 20:02                         ` Doug Ledford
2007-10-19 22:43                     ` chunk size (was Re: Time to deprecate old RAID formats?) Michal Soltys
2007-10-20 13:29                       ` Doug Ledford
2007-10-23 19:21                         ` Michal Soltys
2007-10-24  0:14                           ` Doug Ledford
2007-10-19 17:11         ` Time to deprecate old RAID formats? Doug Ledford
2007-10-19 18:39           ` John Stoffel
2007-10-19 21:23             ` Iustin Pop
2007-10-19 21:42               ` Doug Ledford
2007-10-20  7:53                 ` Iustin Pop
2007-10-20 13:11                   ` Doug Ledford
2007-10-26  9:54                     ` Luca Berra
2007-10-26 16:22                       ` Gabor Gombas
2007-10-26 17:06                         ` Gabor Gombas
2007-10-27 10:34                           ` Luca Berra
2007-10-26 18:52                       ` Doug Ledford
2007-10-26 22:30                         ` Gabor Gombas
2007-10-28  0:26                           ` Doug Ledford
2007-10-28 14:13                             ` Luca Berra [this message]
2007-10-28 17:47                               ` Doug Ledford
2007-10-29  8:41                                 ` Luca Berra
2007-10-29 15:30                                   ` Doug Ledford
2007-10-29 21:44                                     ` Luca Berra
2007-10-29 23:05                                       ` Doug Ledford
2007-10-30  3:10                                         ` Neil Brown
2007-10-30  6:55                                         ` Luca Berra
2007-10-30 16:48                                           ` Doug Ledford
2007-10-27  8:00                         ` Luca Berra
2007-10-27 20:09                           ` Doug Ledford
2007-10-28 13:46                             ` Luca Berra
2007-10-23 23:09                 ` Bill Davidsen
2007-10-23 23:03             ` Bill Davidsen
2007-10-24  0:09               ` Doug Ledford
2007-10-24 23:55                 ` Neil Brown
2007-10-25  0:09                   ` Jeff Garzik
2007-10-25  8:09                     ` David Greaves
2007-10-26  6:16                       ` Neil Brown
2007-10-26 14:18                         ` Bill Davidsen
2007-10-26 18:41                           ` Doug Ledford
2007-10-26 22:20                             ` Gabor Gombas
2007-10-26 22:58                               ` Doug Ledford
2007-10-27 11:11                               ` Luca Berra
2007-10-27 15:20                             ` Bill Davidsen
2007-10-28  0:18                               ` Doug Ledford
2007-10-29  0:44                                 ` Bill Davidsen
2007-10-27 21:11                             ` Doug Ledford
2007-10-29  0:48                               ` Bill Davidsen
2007-10-30  3:25                           ` Neil Brown
2007-11-02 12:31                             ` Bill Davidsen
2007-10-25  7:01                   ` Doug Ledford
2007-10-25 14:49                   ` Bill Davidsen
2007-10-25 15:00                     ` David Greaves
2007-10-26  5:56                     ` Neil Brown
2007-10-24 14:00               ` John Stoffel
2007-10-24 15:18                 ` Mike Snitzer
2007-10-24 15:32                 ` Bill Davidsen
2007-10-20 14:09       ` Michael Tokarev
2007-10-20 14:24         ` Doug Ledford
2007-10-20 14:52         ` John Stoffel
2007-10-20 15:07           ` Iustin Pop
2007-10-20 15:36             ` Doug Ledford
2007-10-20 18:24           ` Michael Tokarev
2007-10-22 20:39             ` John Stoffel
2007-10-22 22:29               ` Michael Tokarev
2007-10-24  0:42               ` Doug Ledford
2007-10-24  9:40                 ` David Greaves
2007-10-24 20:22                 ` Bill Davidsen
2007-10-25 16:29                   ` Doug Ledford
2007-11-01 21:02                 ` H. Peter Anvin
2007-11-02 15:50                   ` Doug Ledford
2007-10-24  0:36             ` Doug Ledford
2007-10-23 23:18           ` Bill Davidsen
2007-10-19 16:34     ` Justin Piszcz
2007-10-23 23:19       ` Bill Davidsen

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=20071028141336.GC22861@percy.comedia.it \
    --to=bluca@comedia.it \
    --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).