Description of problem: Bug 998543 is related to a change wich implements SSD caching. As such Bug 998543 is a SelfContained change for F20, but for F21 the Change is intended toe be SystemWide. This implies among others dracut support for bcache. This Bug is a starting point for the steps to be taken.
Started discussion on devel@: https://lists.fedoraproject.org/pipermail/devel/2013-September/188625.html
We have initramfs hook at bcache-tools, but I don't know how we should use it.
http://bcache.evilpiepirate.org/#index6h1 ok. our steps I think: we should port initramfs hook to dracut module (https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html#_developer_manual) Rolf, can you do this ?
Created attachment 792597 [details] Initial attempt to build a bcache module for dracut I throw the bcache initramfs/hook and 90mdraid/module-setup.sh in the blender, and the result is my first attempt for a dracut module. It tested it and it does work, so that's OK. I even disabled the bcache udev rule on my root FS, which provided prof that the initramfs worked because /dev/bcache* devices were there. What worries me is the fact that 90mdraid/module-setup.sh has more checks that I left out because I don't understand them. I'm also wondering if this should be part of dracut, or part of bcache-tools.
Well, dracut-032 already contains a bcache module: http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/modules.d/90bcache/module-setup.sh $ rpm -qf /usr/lib/dracut/modules.d/90bcache/ dracut-032-11.git20130822 $ cat /usr/lib/dracut/modules.d/90bcache/module-setup.sh #!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh check() { type -P probe-bcache >/dev/null || return 1 [[ $hostonly ]] || [[ $mount_needs ]] && { for fs in "${host_fs_types[@]}"; do [[ $fs = "bcache" ]] && return 0 done return 255 } return 0 } depends() { return 0 } installkernel() { instmods bcache } install() { inst_multiple probe-bcache ${udevdir}/bcache-register inst_rules 61-bcache.rules } What else do you need?
Thanks, looks like that takes care of it. Looking forward: blkid (util-linux) may obsolete probe-bcache, see bug 1001120. I'll leave this bug open to address it when util-linux is updated, OK?
For F20 probe-bcache will be obsoleted indeed by util-linux: https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c13
Removing probe-bcache will be a Fedora-specific change until upstream can assume everyone has the next util-linux release. If you go ahead with it, I'd recommend patching the Dracut module in preference to an upstream change.
Did some testing in an f20 image, the bcache module in dracut works fine.
dracut-033-1.fc21
This is not really a bug (yet), but for the record: Testing demonstrated the following: ${host_fs_types[@]} appears to rely on blkid. With the current util-linux there's no bcache reported in host_fs_types, so dracut only creates a working initramfs with the -N option. When using the new util-linux (2.24) blkid reports bcache, and then dracut creates a working initramfs without the -N option. In the end for F20 this won't be an issue, but if (only __if__) bcache is backported to F19 (or older?) this may lead to confusion for users. This also depends on dracut and util-linux being backported.
(In reply to Rolf Fokkens from comment #11) > This is not really a bug (yet), but for the record: > > Testing demonstrated the following: > > ${host_fs_types[@]} appears to rely on blkid. With the current util-linux > there's no bcache reported in host_fs_types, so dracut only creates a > working initramfs with the -N option. When using the new util-linux (2.24) > blkid reports bcache, and then dracut creates a working initramfs without > the -N option. > > In the end for F20 this won't be an issue, but if (only __if__) bcache is > backported to F19 (or older?) this may lead to confusion for users. This > also depends on dracut and util-linux being backported. yes, true