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.
+++ This bug was initially created as a clone of Bug #602649 +++
Description of problem:
Version-Release number of selected component (if applicable):
* dracut-005-3.fc13.noarch
How reproducible:
Steps to Reproduce:
1. lvcreate -s -n lv_snap -L 9G /dev/vg_test1055/lv_root
2. sed -i 's|lv_root|lv_snap|g' /etc/grub.conf /etc/fstab
3. reboot
Actual results:
No root device found
+ source_all emergency
+ local f
+ [ emergency ]
+ [ -d /emergency ]
+ [ -e /emergency/50plymouth-emergency.sh ]
+ . /emergency/50plymouth-emergency.sh
+ [ -x /bin/plymouth ]
+ /bin/plymouth --hide-splash
+ echo
+ getarg rdshell
+ set +x
+ return 0
+ echo Dropping to debug shell.
Dropping to debug shell.
+ echo
+ export PS1=dracut:${PWD}#
+ [ -e /.profile ]
+ echo exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
+ sh -i -l
sh: can't access tty; job control turned off
dracut:/# lvm lvs
File descriptor 9 (/.console_lock) leaked on lvm invocation. Parent PID 853: sh
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv_root vg_test1055 owi--- 8.81g
lv_snap vg_test1055 swi--- 9.00g lv_root
lv_swap vg_test1055 -wi-a- 1.00g
dracut:/# lvm vgscan
File descriptor 9 (/.console_lock) leaked on lvm invocation. Parent PID 853: sh
Reading all physical volumes. This may take a while...
Found volume group "vg_test1055" using metadata type lvm2
dracut:/# lvm vgchange -ay
File descriptor 9 (/.console_lock) leaked on lvm invocation. Parent PID 853: sh
vg_test1055-lv_snap: event registration failed: 856:3 libdevmapper-event-lvm2snapshot.so dlopen failed: libdevmapper-event-lvm2snapshot.so: cannot open shared object file: No such file or directory
vg_test1055/snapshot0: snapshot segment monitoring function failed.
3 logical volume(s) in volume group "vg_test1055" now active
Expected results:
* dracut is able to find and use a LVM snapshot as the root volume
Additional info:
# cat /proc/cmdline
ro root=/dev/mapper/vg_test1055-lv_snap rd_LVM_LV=vg_test1055/lv_snap rd_LVM_LV=vg_test1055/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=ttyS0 rdshell rdinitdebug
* Harald already has a patch to address the missing library libdevmapper-event-lvm2snapshot.so. See http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commitdiff;h=edcd2c5eb7a455e9a606153bdbe2e9a4b8774a9c
--- Additional comment from jlaska on 2010-06-10 08:23:27 EDT ---
Additional info:
* Using the patch noted in comment#0, and rebuilding the dracut ramdisk addresses the missing library
* I then needed to remove all rd_LVM_LV= values from the boot command-line, then dracut is able to find and use the lvm snapshot as the root volume
--- Additional comment from jlaska on 2010-06-10 09:04:06 EDT ---
(In reply to comment #1)
> * I then needed to remove all rd_LVM_LV= values from the boot command-line,
> then dracut is able to find and use the lvm snapshot as the root volume
Still investigating why 'lvm vgchange -ay' WORKS, but 'lvm lvchange -ay /dev/vg_test1055/lv_snap' FAILS when attempting to mount the root device...
--- Additional comment from jlaska on 2010-06-10 10:54:34 EDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > * I then needed to remove all rd_LVM_LV= values from the boot command-line,
> > then dracut is able to find and use the lvm snapshot as the root volume
>
> Still investigating why 'lvm vgchange -ay' WORKS, but 'lvm lvchange -ay
> /dev/vg_test1055/lv_snap' FAILS when attempting to mount the root device...
According to prajnoha, the 'lvchange' command does not support a snapshot as an argument.
"Instead, you need to run lvchange -ay /dev/vg/origin_lv which will activate *both* origin_lv and snap_lv. Because of the way snapshots work, it is necessary always to have all snapshots+origin active together, or none of them active. You can't pick and choose which"
To summarize, to get LVM snapshot root volume working:
1. I applied the patch noted in comment#0
2. I rebuild the initramfs
3. Create a snapshot volume: lvcreate -s -n lv_snap -L9G /dev/vg_test1055/lv_root
4. Update grub.conf and set root=/dev/vg_test1055/lv_snap
5. Update fstab to use /dev/vg_test1055/lv_snap
6. Reboot
Comment 2RHEL Program Management
2010-06-10 15:23:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release. Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release. This request is not yet committed for
inclusion.
Comment 4Alexander Todorov
2010-06-11 11:55:39 UTC
Something I've been personally interested in. qa_ack+
Comment 6Alexander Todorov
2010-07-05 10:03:29 UTC
With dracut-004-23.el6.noarch there is no error on boot and the system comes up fine. So I'll move this to VERIFIED.
Some notes though:
(In reply to comment #0)
> To summarize, to get LVM snapshot root volume working:
> 1. I applied the patch noted in comment#0
> 2. I rebuild the initramfs
> 3. Create a snapshot volume: lvcreate -s -n lv_snap -L9G
> /dev/vg_test1055/lv_root
> 4. Update grub.conf and set root=/dev/vg_test1055/lv_snap
> 5. Update fstab to use /dev/vg_test1055/lv_snap
I believe you have to update the fstab which is on the lv_snap not on lv_root. I'll open another bug to track this (needs proper documentation at least).
Comment 7Alexander Todorov
2010-07-05 10:20:15 UTC
Bug #611445 filed to track default behavior and (possibly documentation).
Comment 8releng-rhel@redhat.com
2010-11-10 20:19:18 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.