Bug 244202

Summary: Boot fails if any LVM snapshots are full
Product: Red Hat Enterprise Linux 5 Reporter: Stephen Tweedie <sct>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: James Laska <jlaska>
Severity: low Docs Contact:
Priority: low    
Version: 5.0CC: jturner, k.georgiou
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0437 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:26:19 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:
Attachments:
Description Flags
this is a fix. none

Description Stephen Tweedie 2007-06-14 14:26:21 UTC
Description of problem:
When booting off LVM, the initrd tries to activate all LVs.  This fails if there
are any full snapshots, and initrd fails to recover from the error, leading to a
failure to boot.

Version-Release number of selected component (if applicable):
lvm2-2.02.16-3.el5
mkinitrd-5.1.19.6-1

How reproducible:
100%, I believe.

Steps to Reproduce:
1. Create a small snapshot of the root filesystem ("lvcreate -s ...")
2. Write enough data to the root filesystem to overflow the snapshot ("lvs" will
 show it at 100% full)
3. Reboot
  
Actual results:
Boot fails with a nash SEGV

Expected results:
Should boot!

Comment 1 Stephen Tweedie 2007-06-14 14:27:04 UTC
Boot log from the boot failure:

device-mapper: ioctl: 4.11.0-ioctl (2006-09-14) initialised: dm-devel
  Reading all physical volumes.  This may take a while...
  Found volume group "spectre" using metadata type lvm2
device-mapper: snapshots: snapshot is marked invalid
device-mapper: table: 253:3: snapshot: Failed to read snapshot metadata
device-mapper: ioctl: error adding target to table
  device-mapper: reload ioctl failed: Invalid argument
  10 logical volume(s) in volume group "spectre" now active
nash received SIGSEGV!  Backtrace:
[0x804f8f4]
[0xf6e420]
[0x805c7b4]
[0x805d327]
[0x805e07b]
[0x805b2c3]
[0x805b4a5]
[0x805b5bf]
[0x805b606]
[0x804cf23]
[0x804f7c2]
[0x804fca7]
[0x81780b8]
[0x8048131]
Kernel panic - not syncing: Attempted to kill init!

Comment 2 Stephen Tweedie 2007-06-14 14:28:23 UTC
Fortunately, a readonly rescue boot off CD _does_ boot successfully, and the
situation can then be recovered by removing the full snapshot volume.

Comment 3 Peter Jones 2007-06-14 15:09:38 UTC
Created attachment 157009 [details]
this is a fix.

Fix is attached.  Proposing for 5.2 .

Comment 4 Milan Broz 2007-06-14 16:55:21 UTC
Related to bug 244215 - activation of snapshot marked invalid.

Comment 5 RHEL Program Management 2007-10-16 03:57:39 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Peter Jones 2008-01-31 23:11:05 UTC
Fixed in mkinitrd-5.1.19.6-20 .

Comment 9 James Laska 2008-04-11 16:34:22 UTC
Unable to reproduce on 5.1, however 5.0 appears to consistently trigger the failure.

With the help of Stephen, created a 5.0 and 5.2 (snap#5 20080409) install with a
full lvm snapshot, as seen below:

  LV    VG         Attr   LSize  Origin Snap%  Move Log Copy% 
  root  VolGroup00 owi-ao  3.91G                              
  snap1 VolGroup00 Swi-I- 32.00M root   100.00                
  swap  VolGroup00 -wi-ao  1.94G 

 * The i386+x86_64+ppc+s390x 5.0 systems nash segfault on reboot as noted in
comment#0.
 * The i386+x86_64+ppc+s390x 5.2 systems do not segfault upon reboot.

Moving to VERIFIED

Comment 11 errata-xmlrpc 2008-05-21 15:26:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0437.html