CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does anyone have any experience of mounting the root filesystem of CentOS 6 on ZFS?
OK, so I've been at this a while now and I'm so close (I think), but I just can't get the boot process to mount root from ZFS. Just to complicate things I'm using a 3.18 kernel from XEN4CentOS.
I've grabbed the tar files for SPL & ZFS and got them compiling ok with DKMS - no problems there, created ZPOOL and ZFS dataset for root and rebuilt initramfs (I think) from a copy of the root filesystem on ZFS... and that's where I gut stuck.
I'm not really sure what to put into grub.conf or if everything I need is in initramfs. /boot is still on EXT4 (and can stay there) but I just can't figure out how to mount my new ZFS root filesystem at boot!
I get the impression that this might be easier on CentOS 7, but for many reasons (politcal & technical) I really want to keep this on CentOS 6 for now.
You will have to build ZFS into the kernel - as / you won't be able to use fuse to mount it I'd reckon.
Have a look in the "Linux from Scratch" section - ReaperX7 was looking to build lfs using ZFS root a while back.
Hi syg00, thanks for your reply. I don't think I'm using FUSE as the ZFS modules are built using DKMS from the ZFS on Linux RPMs. I think I'm missing something in initramfs or grub?
I was missing the zfs-dracut package. Once I had that I just copied the running system over to my ZFS dataset (mount at /sysroot) and then chroot'd in to it to create the new initramfs. Then I edited the grub config kernel line to add root=ZFS=pool/dataset and Bob's your uncle!
Next thing to do is to see if I can translate this to CentOS 6 with the XEN 3.18 kernel...
Thanks for the update.
I have a CentOS 7 system about to become a victim of a full system catastrophe and "bare metal" restore test. After the restore I may toss ZFS at it as well - haven't looked at ZFS since OpenSolaris was killed off. Never bothered on Linux - I have been an btrfs advocate since then.
Hey no worries. I've been running ZFS on Linux on a couple of systems for 2 or 3 years now and it's been rock solid (touch wood) and I just love the way you can pool all your storage and dice it up as you like.
I've been waiting for BTRFS to catch up with ZFS but I've come to realise that there are architectural differences that just make ZFS better and so I'd much rather see ZFS become more tightly integrated with Linux as a whole.
I might even try to get /boot on ZFS next but I know this will mean messing with grub and it might be more work than I have time for right now, but at least I can get root on ZFS which was my main aim at this time.
The native Linux kernel port of the ZFS filesystem. To get started with ZFS on Linux simply download the latest release and install using the directions for your distribution.
ChibaPet, sorry it's been a while since you asked your question! I gave up with CentOS 6 in the end and have moved to CentOS 7, and found a new "challenge". I got to the point of having ROOT on ZFS without too many problems and then decided I needed it all encrypted but since ZFS on Linux doesn't yet natively support encryption then the only sensible (other opinions noted) way to do that is to put ZFS on top of LUKS.
So I took it a step at a time and experimented with creating ROOT on LUKS, never having used LUKS before, and that all worked nicely. Next I tried building ZFS on top of LUKS and that all worked great too, but the last bit I can't crack is ROOT on ZFS on LUKS, as grub is looking for ROOT on a ZFS filesystem and doesn't seem to realise that it needs to luksOpen the drives first!
I have found a way to get grub to luksOpen devices before attempting to find ROOT but since my ZFS Pool comprises 10 devices I want to use a KeyFile rather than having to type in a long and complicated password 10 times, but the grub command to luksOpen devices doesn't support KeyFiles!!! Arggggg!!! (It's been frustrating!)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.