Migration to ZFS Root [Solved]

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Migration to ZFS Root [Solved]

Postby ZeroPointEnergy » Sun Sep 23, 2012 0:58

Hi

I'm trying to move my current installation to a a ZFS root. I found a very good howto in the Gentoo Forums:

http://forums.gentoo.org/viewtopic-t-88 ... art-0.html
https://github.com/pendor/gentoo-zfs-in ... tion.mdown

I'm almost there. Grub 2.00 boots the kernel (linux-sabayon-3.5-r7) but when it tries to mount the root filesystem it fails. The only thing i get is a prompt that says "root block device()::: ". I can enter a busybox shell, but from what i see the zpool and zfs tools are missing. The zfs module however is present and loaded.

At the moment i'm not really sure if some of my settings are wrong or if i really have to crate a new initrd with dracut and genkernel as the howto suggests? Has anyone been able to run a ZFS root with that kernel/initrd out of the box?
Last edited by ZeroPointEnergy on Thu Oct 04, 2012 22:02, edited 2 times in total.
ZeroPointEnergy
Baby Hen
 
Posts: 9
Joined: Thu Sep 20, 2012 17:41

Re: Migration to ZFS Root

Postby ZeroPointEnergy » Mon Sep 24, 2012 18:06

For now i tried to set the root parameter manually. It should be something like this "root=ZFS=pool/rootpartition". I still try to find out why grub2-mkconfig does not set that itself.

However, if i do overwrite it manually, initrd tries to import the zpool but fails because "/sbin/zpool" is missing. It seams those userland tools are needed. Is there a easy way to add them to the current initrd?
ZeroPointEnergy
Baby Hen
 
Posts: 9
Joined: Thu Sep 20, 2012 17:41

Re: Migration to ZFS Root

Postby ryao » Mon Sep 24, 2012 19:22

Those instructions are old. There is no need for that overlay. genkernel will include the binaries in the initramfs if you pass --zfs to it. lxnay might not be doing that in his kernel builds. Either that or you have a 32-bit system on which ZFS won't work well.

By the way, if you want an up to date reference, here is a set of notes that I have on how to install Gentoo on ZFS:

https://github.com/ryao/zfs-overlay/blo ... fs-install

You should be able to adapt them for Sabayon.
ryao
Baby Hen
 
Posts: 4
Joined: Mon Sep 24, 2012 19:19

Re: Migration to ZFS Root

Postby ZeroPointEnergy » Mon Sep 24, 2012 22:49

thank you for that notes. I guess I just have to rebuild the initrd with genkernel as you pointed out. Everything else seams to be in place, but I will see :-)

Somehow expected from the Sabayon 10 announcement this would work out of the box so i can finally stop to fiddle around with that kernel stuff :?
ZeroPointEnergy
Baby Hen
 
Posts: 9
Joined: Thu Sep 20, 2012 17:41

Re: Migration to ZFS Root

Postby ZeroPointEnergy » Thu Sep 27, 2012 20:54

Just for the record, all it took was a initramfs rebuild like ryao suggested (thx again):

Code: Select all
genkernel initramfs --zfs --real-root=ZFS=mypool/ROOT


That's it. My Sabayon is now running on a ZFS root, no other filesystems except swap. So far the performance seams quite comparable to other filesystems. The plan is to augment it with an SSD l2arc cache soon, wonder how much this will improve speed for a desktop machine (used for gaming and work)

I still haven't tested if it still works if i reconnect all disks in different order. There are still some issues with that zpool.cache file. I wonder if that file is really necessary, because initramfs should be able to discover the root on it's own, no mater how they are connected. But at the moment is seams to use that cache to find out where the discs are.
ZeroPointEnergy
Baby Hen
 
Posts: 9
Joined: Thu Sep 20, 2012 17:41

Re: Migration to ZFS Root

Postby micia » Sun Sep 30, 2012 0:33

If you solved your issue, please mark this thread as such, as per:
:arrow: viewtopic.php?f=57&t=17059
User avatar
micia
Sagely Hen
 
Posts: 2710
Joined: Wed Nov 26, 2008 16:41


Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests