Bug 1003207
Summary: | Dracut needs support for bcache | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Rolf Fokkens <rolf> | ||||
Component: | dracut | Assignee: | dracut-maint | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | dracut-maint, g2p.code+rhbugs, harald, ignatenko, jonathan | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | dracut-033-1.fc21 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-09-12 13:15:04 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 998543, 999690, 1008227, 1008228 | ||||||
Attachments: |
|
Description
Rolf Fokkens
2013-08-31 20:19:59 UTC
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 |