grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@cfl.rr.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org,
	The development of GNU GRUB <grub-devel@gnu.org>,
	John Sheu <john.sheu@gmail.com>,
	Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Subject: Re: Software RAID and Fakeraid
Date: Wed, 02 Feb 2011 10:34:09 -0500	[thread overview]
Message-ID: <4D497971.4090709@cfl.rr.com> (raw)
In-Reply-To: <20110202142233.79940092@notabene.brown>

On 2/1/2011 10:22 PM, NeilBrown wrote:
> There is a difficulty in case 2 as it is not clear who's responsibility it is
> to write a partition table at the start of each device.
> Presumably GRUB doesn't like to write partition tables unless one already
> exists.

Yes, it preserves the existing partition table and just modifies the
boot loader code in the MBR.

> Currently mdadm doesn't write a partition table either.  Possibly it could,
> but I would rather avoid that if possible.
> Maybe once case 2 has been clearly identified, GRUB could consider that
> sufficient permission to write a boot block and partition table even if no
> partition table existed??

Possibly, but that is the kind of thing I think should require an
explicit request.  Whether it is done by mdadm or not, I think that
someone should write a protective mbr.  Since mdadm is what is
effectively formatting the disk, it makes the most sense to me to do it
there, rather than in grub, which is just trying to install a boot
loader to an existing disk.  I suppose the OS installer could add the
MBR before asking mdadm to add its superblocks too.  What partition type
would be appropriate to use?

> In the 'reserved' case, mdadm would also report where the space is. e.g.
> 
>  MD_BOOT_SPACE="/dev/sda 8192 32768"
> 
> means that from byte offset 8192 there is 32768 bytes of available space.
> I would need to make sure that mdadm kept that space available, so I would
> need to know how much to reserve.  Maybe 32K.  Maybe 1M is safe?

Sounds good.  Grub is used to operating with 32k or less since that is
the historical amount of free space following the MBR.

> However there is another complication.
> I understand that the boot block sometimes lives at the start of the
> partition instead of (or as well as) the start of the device.
> I'm fairly syslinux does this - I don't know about GRUB.
> So I really want to still report BIOS or 'reserved' or 'no' even when
> partitions are in use.

Grub can be installed to the partition boot block, but it is strongly
discouraged since there is no gap to embed the core into, so the boot
block must use block lists to locate it.  This comes with all kinds of
headaches, including not being possible at all on some filesystems, and
frequently breaking on others.  Either way you still have to have boot
code in the MBR to go load the partition boot block, so I don't think
that changes anything with respect to this discussion.

> So maybe I should scrap case 0 (MD_BOOTABLE=partitions), assume that the
> boot-loader configurer can detect and understand partitions itself, and just
> report the other 3 cases ignoring the details about partitions.
> 
> Would that be helpful?  Would it get used?  How could it be better?

Yes, it sounds quite helpful.


  reply	other threads:[~2011-02-02 15:33 UTC|newest]

Thread overview: 22+ 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 22:25   ` Neil Brown
2010-12-02 22:13     ` Phillip Susi
2010-12-03  1:36       ` Neil Brown
2010-12-03  3:15         ` Phillip Susi
2010-12-08 22:43           ` Neil Brown
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 22:12                     ` Lennart Sorensen
2011-02-01  1:31                       ` Phillip Susi
2011-02-01 11:04                         ` Michal Suchanek
2011-02-01 16:26                         ` Lennart Sorensen
2011-02-02  0:08                           ` Phillip Susi
2011-02-02  3:22                             ` NeilBrown
2011-02-02 15:34                               ` Phillip Susi [this message]
2011-02-02 16:09                           ` hansbkk
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=4D497971.4090709@cfl.rr.com \
    --to=psusi@cfl.rr.com \
    --cc=grub-devel@gnu.org \
    --cc=john.sheu@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=neilb@suse.de \
    /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).