All of lore.kernel.org
 help / color / mirror / Atom feed
* grub-setup on ZFS (Re: [PATCH] Enable `grub-probe -t device'  resolution on ZFS)
@ 2010-08-04 13:56 Robert Millan
  2010-08-04 14:00 ` Robert Millan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Robert Millan @ 2010-08-04 13:56 UTC (permalink / raw)
  To: The development of GNU GRUB

2010/8/4, Seth Goldberg <seth.goldberg@oracle.com>:
>> I don't think this is the appropiate place for this kind of sanity check.
>> Keep in mind "grub-probe -t device" has many purposes, and for some of
>> them
>> (e.g. determining the partmap) the ZFS status is irrelevant.
>
>    Hmm.  I do see your point here, but then I'd ask how you plan to handle
> ensuring that all disks in a mirror are properly updated with boot/core.
> I think the proper thing would be either to have grub-probe output a set of
> devices, onto which grub-setup would iterate and install boot/core, or
> implement an abstraction that allows that to happen behind the scenes.  How
> does this work for lvm or other raids?

There are two approaches, one of them is simply to run grub-install for each
of the intended devices.  This is what Debian scripts do, and is independant
on the content in the partitions of those devices (lvm, raid, zfs, whatever).

The other is giving grub-setup special knowledge of the abstraction. We do
this for RAID1, see the code around:

util/i386/pc/grub-setup.c:      devicelist = grub_util_raid_getmembers
(dest_dev);

which allows user to e.g. "grub-install /dev/md0". Then the scripts
embed raid.mod
into core.img, and (in principle) after core.img has been loaded GRUB has RAID
mirroring protection to access /boot/grub/.

I suppose it's possible to do something similar for ZFS mirror layouts.

>    The question is: should GRUB2's installation be implicit or explicit for
> all members of a mirrored root pool when grub-setup is invoked.

Implicit approach only works for mirrored setup.  If you want to install to all
members in a non-mirrored pool, you still need explicit approach, so I'd only
implement implicit one if there's a clear benefit, such as the protection
offered by mirroring.  I would check if zfs.mod from grub-extras provides this
protection before trying to answer this question.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-01  2:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-04 13:56 grub-setup on ZFS (Re: [PATCH] Enable `grub-probe -t device' resolution on ZFS) Robert Millan
2010-08-04 14:00 ` Robert Millan
2010-08-16  6:56 ` Seth Goldberg
2010-08-17 10:32   ` Robert Millan
2010-08-17 19:06     ` Seth Goldberg
2010-08-31 20:34 ` GRUB2 and libzfs on Solaris Seth Goldberg
2010-08-31 21:19   ` Colin Watson
2010-08-31 21:38     ` Seth Goldberg
2010-09-01  2:03     ` Seth Goldberg

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.