Bug 1081435

Summary: Add dm-cache module to ramdisk when cached LV is used in the stack
Product: Red Hat Enterprise Linux 7 Reporter: Marian Csontos <mcsontos>
Component: dracutAssignee: dracut-maint
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dracut-maint-list, harald, jbrassow, ljozsa, mbanas, mcsontos, svenkatr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-033-156.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:36:09 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
Proposed patch none

Description Marian Csontos 2014-03-27 10:12:01 UTC
Description of problem:

Machine with root on cached LV is not bootable at the moment.

dm-cache kernel module is required in the ramdisk to make root FS using cached LV in the stack bootable.

There are few interesting stacks this allows:

- cached LV (thin-LV, RAID, linear)
- thin-LV on a cached pool (POOL_tdata is cached LV (linear or RAID))

Comment 2 Harald Hoyer 2014-03-27 11:35:35 UTC
Created attachment 879424 [details]
Proposed patch

Comment 3 Marian Csontos 2014-03-27 12:30:35 UTC
Thanks Harald, you beat me posting the patch before I managed to test my changes.
Excuse me, actually it is dm-cache-mq which is required.

I would add dm-cache-cleaner too - if there is a problem during boot it would allow merging data from cache to its origin and dropping cache.
*Jon*, is there something else required I missed?

This change is pretty self-contained. Risk of breaking things is close to 0.

The only thing is relevant modules will be included unconditionally making ramdisk slightly larger, am I correct?

Making proper detection of cache modules required can be postponed till 7.1 as it will be somewhat larger patch.

Comment 5 Harald Hoyer 2014-03-27 15:28:29 UTC
dracut-033-156.el7 added  dm-cache-cleaner and dm-cache-mq

Comment 7 Ladislav Jozsa 2014-04-01 13:45:11 UTC
Verified with dracut-033-156.el7. It is possible to boot with machine having rootfs either on thin-lv or cached lv. The following warnings were issued to the console:

[    0.923782] Buffer I/O error on device dm-4, logical block 167920
[    0.926027] Buffer I/O error on device dm-4, logical block 167920
[    2.068079] Buffer I/O error on device dm-4, logical block 167920
[    2.070444] Buffer I/O error on device dm-4, logical block 167920
[    2.323696] Buffer I/O error on device dm-8, logical block 1008
[    2.325884] Buffer I/O error on device dm-8, logical block 1008

Marian, is it expected?

Comment 8 Marian Csontos 2014-04-01 20:48:57 UTC
It is a "feature" - there is an error dm-mapping in the system for each cache-pool - see dmsetup status. And something is trying to read them IIUC - you will see these e.g. when running `blkid`.

Comment 9 Ludek Smid 2014-06-13 12:36:09 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.