Bug 587063

Summary: Unable to create 1 extent snapshot on 1k VG
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Petr Rockai <prockai>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: agk, dwysocha, heinzm, jbrassow, joe.thornber, mbroz, prockai
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 22:41:26 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 Corey Marthaler 2010-04-28 19:08:22 UTC
Description of problem:
This is basically the user space issue listed in bug 502965 which I don't think was ever filed. This attempt "fails" but appears to succeed when you look at the created device.

[root@grant-01 ~]# lvcreate -l 1 -n small_snap_on_1k_vg -s /dev/snapper/origin
  device-mapper: reload ioctl failed: Input/output error
  Failed to suspend origin origin

[root@grant-01 ~]# lvs -a -o +devices
  LV                  VG         Attr   LSize  Origin Snap%  Devices
  LogVol00            VolGroup00 -wi-ao 64.56G               /dev/sda2(0)
  LogVol01            VolGroup00 -wi-ao  9.81G               /dev/sda2(2066)
  origin              snapper    -wi-a- 10.00K               /dev/sdb1(0)
  small_snap_on_1k_vg snapper    -wi-a-  1.00K               /dev/sdb1(10)

Version-Release number of selected component (if applicable):
lvm2-2.02.56-8.el5_5.3

How reproducible:
Everytime

Comment 1 Alasdair Kergon 2010-07-09 21:01:56 UTC
Should be straightforward to detect this up front and give an error message.

Comment 2 Petr Rockai 2010-10-12 22:52:14 UTC
Proposed patch in https://www.redhat.com/archives/lvm-devel/2010-October/msg00002.html (pending review; trivial).

Comment 3 Heinz Mauelshagen 2010-10-13 12:19:51 UTC
ACK, a straightforward correct catcher.

Comment 4 Petr Rockai 2010-10-13 13:55:28 UTC
Checked in.

Comment 5 Milan Broz 2010-10-15 15:09:23 UTC
Fix in lvm2-2.02.74-1.el5.

Comment 7 Corey Marthaler 2010-11-01 22:34:10 UTC
This operation is no longer allowed. Marking verified in lvm2-2.02.74-1.el5.

[root@grant-01 ~]# lvcreate -l 1 -n small_snap_on_1k_vg -s /dev/snapper/origin
  Unable to create a snapshot smaller than 2 chunks.

[root@grant-01 ~]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Devices
  origin   snapper    -wi-a- 10.00K               /dev/sdb1(0)

[root@grant-01 ~]# lvcreate -l 10 -n small_snap_on_1k_vg -s /dev/snapper/origin
  Logical volume "small_snap_on_1k_vg" created

[root@grant-01 ~]# lvs -a -o +devices
  LV                  VG         Attr   LSize  Origin Snap%  Devices
  origin              snapper    owi-a- 10.00K               /dev/sdb1(0)
  small_snap_on_1k_vg snapper    swi-a- 10.00K origin  80.00 /dev/sdb1(10)

Comment 9 errata-xmlrpc 2011-01-13 22:41:26 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 therefore 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-2011-0052.html