Red Hat Bugzilla – Bug 1546577
Creating an LVM snapshot can render the system unbootable
Last modified: 2018-04-10 14:11:42 EDT
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...
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 }
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.
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