Bug 720684
Summary: | Booting with snapshot of / requires non user-friendly config | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | David Kovalsky <dkovalsk> |
Component: | dracut | Assignee: | Harald Hoyer <harald> |
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.1 | CC: | agk, benl, dracut-maint-list, dwysocha, heinzm, jbrassow, jstodola, lnovich, msnitzer, pknirsch, prajnoha, prockai, thornber, zkabelac |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | dracut-004-322.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
dracut does not call "lvchange" with the "--yes" option.
Consequence:
Booting an LVM snapshot required adding rd_LVM_LV of the original volume, which is counter intuitive.
Fix:
dracut calls "lvchange" with the "--yes" option.
Result:
Booting an LVM snapshot does not require adding rd_LVM_LV of the original volume anymore.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2013-11-21 21:53:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
David Kovalsky
2011-07-12 13:32:13 UTC
bug 602793 ??? Ooops, temporary brain outage / finger malfunction. I meant bug 602723 / bug 602649. Sorry for the confusion. https://bugzilla.redhat.com/show_bug.cgi?id=602649#c3 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" nothing I can do about... Could perhaps dracut query LVM and figure out that we're trying to boot from snapshot, and request activating the original volume (+all snapshots)? Or could this logic be pushed to LVM? Are there any downsides to activating the original volume + all snapshots during boot? Since RHEL 6.2 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. reassigning to lvm2 to get some comments here. Since version 2.02.89 lvm2 is able to activate snapshots automatically with its origin (giving you a question). If you want proceed with [y] answer - use command like this: lvchange -ay --yes vg/snapshot_lv So I think this is just about adding the "--yes" option to the lvchange command in dracut, reassigning back... Harald, would you add the "--yes" to the lvchange you use in dracut, please? Note that this will activate the origin as well as all other existing snapshots, but I don't see any problem with that except if there are numerous volumes/snapshots, it'll take a bit more time to activate of course. will do First alpha build for testing: http://people.redhat.com/harald/downloads/dracut/dracut-004-316.el6/ Would be nice, if you could test it. [root@rhevh-x3650-01-g1 ~]# lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert lv_root vg_test -wi-ao---- 9.78g [root@rhevh-x3650-01-g1 ~]# lvcreate -s /dev/mapper/vg_test-lv_root -l 100%ORIGIN -n lv_root_snapshot Logical volume "lv_root_snapshot" created [root@rhevh-x3650-01-g1 ~]# sed s/lv_root/lv_root_snapshot/g -i /boot/grub/grub.conf [root@rhevh-x3650-01-g1 ~]# sed s/lv_root/lv_root_snapshot/g -i /etc/fstab [root@rhevh-x3650-01-g1 ~]# reboot During boot: ... dracut: inactive Original '/dev/vg_test/lv_root' [9.78 GiB] inherit dracut: inactive Snapshot '/dev/vg_test/lv_root_snapshot' [9.78 GiB] inherit EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: dracut: Mounted root filesystem /dev/mapper/vg_test-lv_root_snapshot ... After login: [root@rhevh-x3650-01-g1 ~]# mount | grep ' / ' /dev/mapper/vg_test-lv_root_snapshot on / type ext4 (rw) [root@rhevh-x3650-01-g1 ~]# lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert lv_root vg_test owi-a-s--- 9.78g lv_root_snapshot vg_test swi-aos--- 9.78g lv_root 0.03 [root@rhevh-x3650-01-g1 ~]# rpm -q dracut dracut-004-335.el6.noarch [root@rhevh-x3650-01-g1 ~]# 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. http://rhn.redhat.com/errata/RHSA-2013-1674.html |