Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1546577 - Creating an LVM snapshot can render the system unbootable
Creating an LVM snapshot can render the system unbootable
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut (Show other bugs)
7.4
Unspecified Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Lukáš Nykrýn
Release Test Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-18 16:47 EST by Gordon Messmer
Modified: 2018-04-10 14:11 EDT (History)
3 users (show)

See Also:
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 14:11:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0964 None None None 2018-04-10 14:11 EDT

  None (edit)
Description Gordon Messmer 2018-02-18 16:47:51 EST
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 04:21:44 EST
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 11:26:35 EST
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 14:11:08 EDT
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

Note You need to log in before you can comment on or make changes to this bug.