Bug 244214 - kernel dm snapshot: activating of snapshot marked invalid causes incorrect mapping
kernel dm snapshot: activating of snapshot marked invalid causes incorrect ma...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Milan Broz
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-14 11:31 EDT by Milan Broz
Modified: 2013-02-28 23:05 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0791
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 11:29:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Broz 2007-06-14 11:31:19 EDT
Activation of volume group with overfilled snapshot (snapshot marked invalid in
metadata) causes incorrect mapping and causing userspace tools fails.

device-mapper: snapshot is marked invalid
device-mapper: Failed to read snapshot metadata
device-mapper: error adding target to table
  device-mapper: reload ioctl failed: Invalid argument


Snapshot should be "activated" normally but marked invalid only.

Also the mapping table for snapshot in kernel is then incorrect.

Reproducer script:
DEV=/dev/sdb1
VG=vg_test
LV=lv_test

pvcreate $DEV
vgcreate $VG $DEV
lvcreate -L 100M -n $LV $VG
lvcreate -s -L 4M -n "$LV"_snap $VG/$LV

#overfill snapshot
dd if=/dev/zero of=/dev/$VG/$LV bs=5M count=1
sync

vgchange -a n $VG

#activate VG with invalid snapshot
vgchange -a y $VG

#cleaning
vgchange -a n $VG
lvremove $VG/"$LV"_snap
lvremove $VG/"$LV"
vgremove $VG
pvremove $DEV
Comment 1 RHEL Product and Program Management 2007-06-14 11:45:50 EDT
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 3 Don Howard 2007-07-16 01:59:15 EDT
A patch for this issue has been included in build 2.6.9-55.18.EL.
Comment 6 errata-xmlrpc 2007-11-15 11:29:08 EST
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-2007-0791.html

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