[zfs-discuss] Problems with missing boot time ext4 zvol on raidz pool
dajhorn at vanadac.com
Thu Dec 8 19:45:32 EST 2011
On Thu, Dec 8, 2011 at 17:55, Ben <ben.bayliss at gmail.com> wrote:
> Hi all,
> I've a RAIDZ pool so have avoided the native boot tutorial to date
> because my understanding is that booting purely from raidz is not
> possible, and boot=zfs wouldn't work?
> For my NAS system, I'm trying to move over to a USB boot solution
> instead of the old and breaking 2.5" hdd that has been in there. I've
> formatted a USB stick with a separate /boot partition on it, and
> created a zvol formatted as ext4 to house an Ubuntu Server
> installation on my main pool.
> I got it working perfectly at first, but for some unknown reason
> decided to move the boot partition onto a different USB stick, and now
> I can't for the life of me get it to work again, even though I've
> started from scratch twice now, on either stick!
> The problem seems to be that although the boot process comes up with
> all the correct modules loaded, pool imported and ZFS filesystems
> mounted ok, for some reason the /dev/tank/volume and /dev/zd0, /dev/
> zd16 etc.. devices aren't appearing; and therefore the UUID specified
> in Grub for root doesn't exist and it bombs to the initramfs shell. To
> make them appear I have to export then reimport the pool and then it
> either boots ok or crashes. Obviously though I can't be intervening
> every single boot time to make it work. A quick search on this list
> shows a few other threads where people have experienced similar
> disappearances so seemingly I'm not alone.
> Any new ideas why these devices aren't appearing by themselves?
> Alternatively - since this method seems a bit buggy still - is there a
> more up-to-date guide for setting up this kind of system available
> anywhere? If I'm going about this the wrong way entirely and a purely
> zfs based solution would work (again, bearing in mind it's a raidz
> pool) I'm more than happy to start afresh again!
> I could just keep the whole Ubuntu installation on the USB stick, but
> it's not very quick and I suspect would die from read/write cycles
> pretty quickly if it was used for much more than just booting into the
> Thanks as always,
This bug is ticketed here:
Linux can boot into a native ZFS root filesystem in a RAIDZ volume. Do this:
1. Keep a small /boot file system on the USB storage device.
The /boot filesystem is unlikely to wear down USB flash drive, even a
cheap one that can only do a few hundred rewrite cycles, especially if
/boot is FAT16. I use the Koutech IO-UU220 to put the USB boot device
on a motherboard header.
2. Edit the /etc/default/grub or /boot/grub/grub.cfg files, as
appropriate for your system, and set the rpool=MyRaidzPool kernel
Manually overriding rpool is required because the `zpool` utility will
reject setting the bootfs=MyRaidzPool/ROOT/ubuntu property on the
RAIDZ pool. I might submit a patch to relax this restriction when I
become more comfortable with the solution, but until then this kind of
configuration will be more work.
Darik Horn <dajhorn at vanadac.com>
More information about the zfs-discuss