[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub-setup on ZFS (Re: [PATCH] Enable `grub-probe -t device' resolution

From: Robert Millan
Subject: grub-setup on ZFS (Re: [PATCH] Enable `grub-probe -t device' resolution on ZFS)
Date: Wed, 4 Aug 2010 15:56:55 +0200

2010/8/4, Seth Goldberg <address@hidden>:
>> 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

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]