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 611445 - [TRACKER] What's the default behavior of LVM snapshot root?
Summary: [TRACKER] What's the default behavior of LVM snapshot root?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Harald Hoyer
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-05 10:19 UTC by Alexander Todorov
Modified: 2010-07-07 14:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-07 14:35:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alexander Todorov 2010-07-05 10:19:35 UTC
Description of problem:
With this bug as a tracker I'd like to know what will be default behavior of the feature where root filesystem is on LVM snapshot volume (see bug #602723). 

In particular:
https://bugzilla.redhat.com/show_bug.cgi?id=602723#c6

> 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've tried this:

1) After creating lv_snap and while lv_root was mounted I've updated grub.conf (which is on /boot) and fstab which is on lv_root. Follow the above steps in the exact same order. 

The fstab now points to lv_snap. I've touched the file /root/original-root to distinguish between volumes. 

2) Rebooted the system where root=lv_snap. There was no dracut error but mount showed that lv_root was mounted. This is OK since fstab specified this, I haven't updated it. /root/original-root wasn't there though. 

3) Then I've rebooted with root=lv_root on the command line and mount showed that lv_snap was mounted but original-root file was there. At this point I was confused. 

4) I've fixed fstab files on both volumes to specify the correct volume as root file system and rebooted few more times. All appeared to be working fine and mount was now showing the correct volumes as root file sytem. 



With this bug I need to understand the following:
1) How root file system on LVM snapshot should work - this is not documented in Deployment Guide nor in the LVM Administrators Guide so it has to be. 

2) Based on 1) file a RFE for a tool that will make changes to the required config files so that this feature is less confusing.

Comment 1 Harald Hoyer 2010-07-05 10:44:35 UTC
(In reply to comment #0)
> Description of problem:
> With this bug as a tracker I'd like to know what will be default behavior of
> the feature where root filesystem is on LVM snapshot volume (see bug #602723). 
> 
> In particular:
> https://bugzilla.redhat.com/show_bug.cgi?id=602723#c6
> 
> > 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've tried this:
> 
> 1) After creating lv_snap and while lv_root was mounted I've updated grub.conf
> (which is on /boot) and fstab which is on lv_root. Follow the above steps in
> the exact same order. 
> 
> The fstab now points to lv_snap. I've touched the file /root/original-root to
> distinguish between volumes. 
> 
> 2) Rebooted the system where root=lv_snap. There was no dracut error but mount
> showed that lv_root was mounted. This is OK since fstab specified this, I
> haven't updated it. /root/original-root wasn't there though. 

this is expected, because "mount" outputs mtab, which does not really reflect the current state for root, because mtab could not be modified by mount, because root was mounted read-only... better check /proc/mounts or /proc/self/mountinfo.

> 
> 3) Then I've rebooted with root=lv_root on the command line and mount showed
> that lv_snap was mounted but original-root file was there. At this point I was
> confused.

again.. same mistake
 
> 
> 4) I've fixed fstab files on both volumes to specify the correct volume as root
> file system and rebooted few more times. All appeared to be working fine and
> mount was now showing the correct volumes as root file sytem. 

it's only the output of "mount" with an old mtab, which confuses you.
mtab should really be updated in rc.sysinit to reflect the real state for the root device.

You can also look at /dev/root or replace in /etc/fstab:
/dev/root      /                       <filesystem>    defaults       1 1


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