[zfs-discuss] Boot with/from ZFS

Richard Laager rlaager at wiktel.com
Sat Nov 24 18:20:06 EST 2012


On Sat, 2012-11-24 at 23:47 +0100, Turbo Fredriksson wrote:
> I'll create a 'var/cache/apt' which isn't compressed then. Thanx.

For references, I looked up the bug:
https://github.com/zfsonlinux/zfs/issues/541

> * In Solaris/ZFS it's apparently possible to boot from a snapshot.
>   Is this still possible in ZoL?

I haven't tested this.

> * Why must the pool first be exported and then imported? I'd rather
>   not do this, since I have 13TB already mounted and in use...
>   I assume it's done in the HOWTO(s) so that zfs.cache get's updated? But
>   mine should already be, since it's been running (and rebooting) for about
>   a year :)... ?

I'm not sure, but I'd tend to agree with your conclusion. In general, my
emphasis has been on the things that are *different* between my HOWTO
and Darik's (from which mine is forked). He likely knows more about that
part.

> * Installing grub. My pool currently look like this:
> 
>         NAME                                            STATE     READ WRITE CKSUM
>         share                                           ONLINE       0     0     0
>           raidz1-0                                      ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS3S9YD             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS08THF             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS16S63             ONLINE       0     0     0
>           raidz1-1                                      ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4XK4T             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4Q3F4             ONLINE       0     0     0
>             scsi-SATA_ST1500DL003-9VT_5YD1F2KF          ONLINE       0     0     0
>           raidz1-2                                      ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS3SAWS             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4R2MJ             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS13W11             ONLINE       0     0     0
>           raidz1-3                                      ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4VT5R             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4Q38C             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4WM30             ONLINE       0     0     0
>           raidz1-4                                      ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4VT5X             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS4WWPA             ONLINE       0     0     0
>             scsi-SATA_ST31500341AS_9VS0H3A9             ONLINE       0     0     0
>         cache
>           ata-Corsair_Force_3_SSD_11486508000008952122  ONLINE       0     0     0
> 
> Where would I write grub?

I haven't done much testing with raidz roots.

My vision (which is not a reality at this time) would be for GRUB to
realize that it's a raidz and write the bootloader bits to ALL of the
disks, using the ZFS embedding area even if it's a wholedisk setup (to
avoid the need for a BIOS boot partition). And finally, zpool attach
operations (maybe through the to-be-written zevent daemon) should result
in GRUB installing the bootloader bits to the new drive. Installing to
all drives seems silly (but probably not harmful) when you have 15, but
with 2 or 3 it makes a lot more sense.

> Maybe on the cache dev, and have the BIOS boot from that
> device?

That could work. Just make sure you're okay with what that means if that
drive fails.

> Is there a least required version of grub to be able to do ZFS booting?

You need a patched GRUB, like that from the PPA. I've gotten some
patches accepted upstream, but there's at least one more that'll be
necessary.

-- 
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20121124/fcefe5b9/attachment.sig>


More information about the zfs-discuss mailing list