Bug 1184519

Summary: Boot failure with dm-cache enabled on root filesystem, cache_check missing in initrd
Product: [Fedora] Fedora Reporter: Fabrice Allibe <fabrice.allibe>
Component: dracutAssignee: dracut-maint-list
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: cevich, dracut-maint-list, harald, jonathan, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dracut-038-39.git20150518.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-21 17:36:44 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:
Attachments:
Description Flags
LVM layout of my system none

Description Fabrice Allibe 2015-01-21 15:32:59 UTC
Created attachment 982370 [details]
LVM layout of my system

Description of problem:


Version-Release number of selected component (if applicable): 038-32.git20141216.fc21


How reproducible:

Steps to Reproduce:
1. Enable SSD dm-cache (https://rwmj.wordpress.com/2014/05/22/using-lvms-new-cache-feature/) on the logical volume related to root filesystem
2. Rebuild initrd with dracut
3. Reboot

Actual results: boot failure, system unable to check the dm-cache volume because /sbin/cache_check is not part of the initrd


Expected results: initrd should contain /sbin/cache_check and boot will be fine


Additional info:

Quick and dirty fix done by adding the following line to /usr/lib/dracut/modules.d/90lvm/module-setup.sh:

# diff /usr/lib/dracut/modules.d/90lvm/90lvm_module-setup.old /usr/lib/dracut/modules.d/90lvm/module-setup.sh
119a120
>     inst_multiple -o cache_dump cache_restore cache_check cache_repair

The real bug fix should include this line with additional checks to ensure it is is added only when really needed.

Comment 2 Fabrice Allibe 2015-02-12 09:01:14 UTC
Tested yesterday: initrd is booting fine. :)

Thanks

Comment 3 Chris Evich 2015-04-09 19:34:41 UTC
Ran smack into this also, will try the patch...

Comment 4 Chris Evich 2015-04-09 20:39:46 UTC
...well it sorta kinda works for me.  I'm running dracut from rescue mode, after manually mounting everything up.  I can see the cache_* tools are there, and the dm-cache.ko kernel module gets loaded, but no go when I reboot.  From emergency mode, journalctl shows "Failed to determine version of cache kernel module".  Am I running dracut incorrectly from rescue mode?

dracut -f -v -L 4 /boot/initramfs...blah...img

Comment 5 Chris Evich 2015-04-10 00:57:25 UTC
Woops, this was my fault, I forgot to put the kernel version number after the dracut command so it was picking up the wrong modules (somehow).  Anyway, once I got that sorted, system is now booting find. The new 90lvm/module-setup.sh is working for me also.  FWIW.

Comment 6 Fedora Update System 2015-05-18 12:18:02 UTC
dracut-038-39.git20150518.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dracut-038-39.git20150518.fc21

Comment 7 Fedora Update System 2015-05-19 16:21:09 UTC
Package dracut-038-39.git20150518.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-038-39.git20150518.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-8504/dracut-038-39.git20150518.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-05-21 17:36:44 UTC
dracut-038-39.git20150518.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.