From: Neil Brown <neilb@suse.de> To: Phillip Susi <psusi@cfl.rr.com> Cc: The development of GNU GRUB <grub-devel@gnu.org>, John Sheu <john.sheu@gmail.com>, linux-raid@vger.kernel.org Subject: Re: Software RAID and Fakeraid Date: Fri, 3 Dec 2010 12:36:15 +1100 [thread overview] Message-ID: <20101203123615.6edce071@notabene.brown> (raw) In-Reply-To: <4CF81A16.2010606@cfl.rr.com> On Thu, 02 Dec 2010 17:13:42 -0500 Phillip Susi <psusi@cfl.rr.com> wrote: > On 11/30/2010 5:25 PM, Neil Brown wrote: > > My feeling is that grub just needs to be a bit more careful. > > > > If the members of the md array are partitions, then installing itself in the > > boot blocks of the devices holding those partitions always makes sense. > > > > If the members of the md array are whole devices, then installing grub in > > those devices might make sense depending on specific details of the > > metadata. The default should be that it doesn't make sense, but specific > > cases do. > > e.g. if the metadata (/sys/block/mdX/md/metadata_version) is 0.90 or 1.0, and > > the array is RAID1, then grub should install itself in the *array*, not in > > the devices. > > I don't think that is quite right. For software raid, you can't > actually install to the array per se, since the bios does not know about > it; it only knows about the individual disks. Therefore, grub needs to > be installed to the individual disk(s), and preferably on each member of > a raid 1 so you can still boot with a failed disk. To do this, it needs > the embed area to place the core image into, which doesn't exist if the > array uses the whole disk instead of a partition in it. If the array uses 0.90 or 1.0 metadata and comprises whole-disks (not partitions), and if the array is RAID1, then each device (except for the very end) contains exactly the same data as the whole array. If you install grub to the array, then it will be installed onto all of the (active) devices in the array. And that is certainly the easiest way to write to all device. It won't write to 'spares', so if you want to be able to boot from spares as well .... but I'm not sure that makes sense anyway. > > In the case of fakeraid, the bios does know about it, so grub can and > does install itself into the array, but since this won't work with true > mdadm soft raid using the raw disks, grub needs to be able to tell the > difference. Only seeing the members of the array are raw disks instead > of partitions is not enough information. Completely agree. As I said, there are only some cases where you can boot from an array which uses whole-disks. One case if in the bios understands the array, such as Intel bios's with IMSM metadata, or possibly some bioses with DDF metadata. Another case is RAID1 which starts at the beginning of the device, where the bios doesn't need to know about the RAID. NeilBrown
WARNING: multiple messages have this Message-ID (diff)
From: Neil Brown <neilb@suse.de> To: Phillip Susi <psusi@cfl.rr.com> Cc: linux-raid@vger.kernel.org, The development of GNU GRUB <grub-devel@gnu.org>, John Sheu <john.sheu@gmail.com> Subject: Re: Software RAID and Fakeraid Date: Fri, 3 Dec 2010 12:36:15 +1100 [thread overview] Message-ID: <20101203123615.6edce071@notabene.brown> (raw) In-Reply-To: <4CF81A16.2010606@cfl.rr.com> On Thu, 02 Dec 2010 17:13:42 -0500 Phillip Susi <psusi@cfl.rr.com> wrote: > On 11/30/2010 5:25 PM, Neil Brown wrote: > > My feeling is that grub just needs to be a bit more careful. > > > > If the members of the md array are partitions, then installing itself in the > > boot blocks of the devices holding those partitions always makes sense. > > > > If the members of the md array are whole devices, then installing grub in > > those devices might make sense depending on specific details of the > > metadata. The default should be that it doesn't make sense, but specific > > cases do. > > e.g. if the metadata (/sys/block/mdX/md/metadata_version) is 0.90 or 1.0, and > > the array is RAID1, then grub should install itself in the *array*, not in > > the devices. > > I don't think that is quite right. For software raid, you can't > actually install to the array per se, since the bios does not know about > it; it only knows about the individual disks. Therefore, grub needs to > be installed to the individual disk(s), and preferably on each member of > a raid 1 so you can still boot with a failed disk. To do this, it needs > the embed area to place the core image into, which doesn't exist if the > array uses the whole disk instead of a partition in it. If the array uses 0.90 or 1.0 metadata and comprises whole-disks (not partitions), and if the array is RAID1, then each device (except for the very end) contains exactly the same data as the whole array. If you install grub to the array, then it will be installed onto all of the (active) devices in the array. And that is certainly the easiest way to write to all device. It won't write to 'spares', so if you want to be able to boot from spares as well .... but I'm not sure that makes sense anyway. > > In the case of fakeraid, the bios does know about it, so grub can and > does install itself into the array, but since this won't work with true > mdadm soft raid using the raw disks, grub needs to be able to tell the > difference. Only seeing the members of the array are raw disks instead > of partitions is not enough information. Completely agree. As I said, there are only some cases where you can boot from an array which uses whole-disks. One case if in the bios understands the array, such as Intel bios's with IMSM metadata, or possibly some bioses with DDF metadata. Another case is RAID1 which starts at the beginning of the device, where the bios doesn't need to know about the RAID. NeilBrown
next prev parent reply other threads:[~2010-12-03 1:36 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-11-25 10:26 Software RAID and Fakeraid John Sheu 2010-11-30 19:54 ` Phillip Susi 2010-11-30 19:54 ` Phillip Susi 2010-11-30 22:25 ` Neil Brown 2010-11-30 22:25 ` Neil Brown 2010-12-02 22:13 ` Phillip Susi 2010-12-02 22:13 ` Phillip Susi 2010-12-03 1:36 ` Neil Brown [this message] 2010-12-03 1:36 ` Neil Brown 2010-12-03 3:15 ` Phillip Susi 2010-12-08 22:43 ` Neil Brown 2010-12-08 22:43 ` Neil Brown 2010-12-09 19:48 ` Phillip Susi 2010-12-09 19:48 ` Phillip Susi 2011-01-31 16:44 ` Phillip Susi 2011-01-31 17:03 ` Lennart Sorensen 2011-01-31 19:21 ` Phillip Susi 2011-01-31 19:21 ` Phillip Susi 2011-01-31 22:12 ` Lennart Sorensen 2011-02-01 1:31 ` Phillip Susi 2011-02-01 1:31 ` Phillip Susi 2011-02-01 11:04 ` Michal Suchanek 2011-02-01 11:04 ` Michal Suchanek 2011-02-01 16:26 ` Lennart Sorensen 2011-02-01 16:26 ` Lennart Sorensen 2011-02-02 0:08 ` Phillip Susi 2011-02-02 0:08 ` Phillip Susi 2011-02-02 3:22 ` NeilBrown 2011-02-02 3:22 ` NeilBrown 2011-02-02 15:34 ` Phillip Susi 2011-02-02 15:34 ` Phillip Susi 2011-02-02 16:09 ` hansbkk 2011-02-02 16:09 ` hansbkk 2011-02-02 21:12 ` Leslie Rhorer 2010-12-04 4:34 ` Leslie Rhorer 2010-12-07 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko 2010-12-25 19:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=20101203123615.6edce071@notabene.brown \ --to=neilb@suse.de \ --cc=grub-devel@gnu.org \ --cc=john.sheu@gmail.com \ --cc=linux-raid@vger.kernel.org \ --cc=psusi@cfl.rr.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.