Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1546577

Summary: Creating an LVM snapshot can render the system unbootable
Product: Red Hat Enterprise Linux 7 Reporter: Gordon Messmer <gordon.messmer>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: dracut-maint-list, jstodola, mihai, thozza
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: dracut-033-535.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 18:11:08 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:

Description Gordon Messmer 2018-02-18 21:47:51 UTC
This report is a duplicate of 1287940, which has not been resolved.


Description of problem:
If there are no LVM snapshots when dracut is run, it will not include dm-snapshot.ko in the initrd.  If a snapshot is later created, and the system reboots, the boot process will not complete successfully.

The initrd created by anaconda does include dm-snapshot, so to reproduce the problem one must install, then update, then create a snapshot.

The simple solution is to always include dm-snapshot for systems with LVM filesystems.

Version-Release number of selected component (if applicable):
dracut-033-502.el7_4.1.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install system with default LVM setup.  Use 7.0 or 7.1 so that there will be a kernel update pending after installation.
2. Install newer kernel (yum update)
3. Create a snapshot (lvcreate -L 1G -s -n root_snap /dev/VolGroup/lv_root)
4. Reboot

Actual results:
System will hang at plymouth screen for a while, then drop to a dracut shell.

Expected results:
Normal boot.

Additional info:



[    0.832316] localhost.localdomain dracut-initqueue[258]: Scanning devices vda3  for LVM logical volumes VolGroup/lv_root VolGroup/lv_swap
[    0.843334] localhost.localdomain kernel: usb 1-1: New USB device found, idVendor=0627, idProduct=0001
[    0.843338] localhost.localdomain kernel: usb 1-1: New USB device strings: Mfr=1, Product=3, SerialNumber=5
[    0.843350] localhost.localdomain kernel: usb 1-1: Product: QEMU USB Tablet
[    0.843351] localhost.localdomain kernel: usb 1-1: Manufacturer: QEMU
[    0.843353] localhost.localdomain kernel: usb 1-1: SerialNumber: 42
[    0.846908] localhost.localdomain kernel: input: QEMU QEMU USB Tablet as /devices/pci0000:00/0000:00:05.7/usb1/1-1/1-1:1.0/input/input2
[    0.847592] localhost.localdomain dracut-initqueue[258]: inactive '/dev/VolGroup/lv_var' [12.91 GiB] inherit
[    0.847805] localhost.localdomain dracut-initqueue[258]: inactive '/dev/VolGroup/lv_swap' [2.00 GiB] inherit
[    0.848030] localhost.localdomain dracut-initqueue[258]: inactive Original '/dev/VolGroup/lv_root' [20.00 GiB] inherit
[    0.848277] localhost.localdomain dracut-initqueue[258]: inactive Snapshot '/dev/VolGroup/lv_root-snap' [2.00 GiB] inherit
[    0.847069] localhost.localdomain kernel: hid-generic 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU QEMU USB Tablet] on usb-0000:00:05.7-1/input0
[    0.865914] localhost.localdomain dracut-initqueue[258]: modprobe: FATAL: Module dm-snapshot not found.
[    0.866363] localhost.localdomain dracut-initqueue[258]: /usr/sbin/modprobe failed: 1
[    0.866764] localhost.localdomain dracut-initqueue[258]: Can't process LV lv_root-snap: snapshot target support missing from kernel?
[    1.253710] localhost.localdomain kernel: input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[  124.378169] localhost.localdomain dracut-initqueue[258]: Scanning devices vda3  for LVM logical volumes VolGroup/lv_root VolGroup/lv_swap
[  124.439876] localhost.localdomain dracut-initqueue[258]: inactive '/dev/VolGroup/lv_var' [12.91 GiB] inherit
[  124.440313] localhost.localdomain dracut-initqueue[258]: ACTIVE '/dev/VolGroup/lv_swap' [2.00 GiB] inherit
[  124.440701] localhost.localdomain dracut-initqueue[258]: inactive Original '/dev/VolGroup/lv_root' [20.00 GiB] inherit
[  124.441074] localhost.localdomain dracut-initqueue[258]: inactive Snapshot '/dev/VolGroup/lv_root-snap' [2.00 GiB] inherit
[  124.444998] localhost.localdomain dracut-initqueue[258]: PARTIAL MODE. Incomplete logical volumes will be processed.
[  124.463688] localhost.localdomain dracut-initqueue[258]: modprobe: FATAL: Module dm-snapshot not found.
[  124.463978] localhost.localdomain dracut-initqueue[258]: /usr/sbin/modprobe failed: 1
[  124.464281] localhost.localdomain dracut-initqueue[258]: Can't process LV lv_root-snap: snapshot target support missing from kernel?
[  124.470154] localhost.localdomain dracut-initqueue[258]: PARTIAL MODE. Incomplete logical volumes will be processed.
[  185.193123] localhost.localdomain dracut-initqueue[258]: Warning: Could not boot.
[  185.199959] localhost.localdomain dracut-initqueue[258]: Warning: /dev/VolGroup/lv_root does not exist
[  185.201547] localhost.localdomain dracut-initqueue[258]: Warning: /dev/mapper/VolGroup-lv_root does not exist
[  185.210453] localhost.localdomain systemd[1]: Starting Dracut Emergency Shell...

Comment 2 Lukáš Nykrýn 2018-02-19 09:21:44 UTC
As Harald suggested we should add:
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index c4db779a..6ca4ee44 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -43,7 +43,7 @@ cmdline() {
 }
 
 installkernel() {
-    instmods dm-snapshot
+    hostonly='' instmods dm-snapshot
 }

Comment 5 Jan Stodola 2018-02-22 16:26:35 UTC
Reproduced on RHEL-7.4 GA using the steps in comment 0.

Verified using dracut-033-535.el7 using the same steps, the dm-snapshot kernel module was present in the initrd even when no LVM snapshot was created on the system. After creating a new snapshot and restarting, the system started without errors.

Moving to VERIFIED.

Comment 8 errata-xmlrpc 2018-04-10 18:11:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0964