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 1066977 - lvm2 calculates snapshot space incorrectly
Summary: lvm2 calculates snapshot space incorrectly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1035871
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-19 12:45 UTC by Zdenek Kabelac
Modified: 2023-03-08 07:26 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.105-8.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1035871
Environment:
Last Closed: 2014-06-13 11:04:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Zdenek Kabelac 2014-02-26 13:58:10 UTC
Upstreamed updated version of Mikulas' patch:

http://www.redhat.com/archives/lvm-devel/2014-February/msg00161.html

Comment 5 Peter Rajnoha 2014-02-27 13:17:08 UTC
One more patch needed for a fix here, it's included in lvm2-2.02.105-8.el7.

Comment 6 Zdenek Kabelac 2014-03-06 16:38:45 UTC
Upstream test case:

https://www.redhat.com/archives/lvm-devel/2014-March/msg00045.html

Comment 7 Corey Marthaler 2014-03-21 16:17:46 UTC
Fix verified in the latest rpms.

3.10.0-110.el7.x86_64
lvm2-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
lvm2-libs-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
lvm2-cluster-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-libs-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-event-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-event-libs-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-persistent-data-0.2.8-4.el7    BUILT: Fri Jan 24 14:28:55 CST 2014
cmirror-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014



BEFORE FIX:

[root@harding-03 ~]# lvcreate -L 2143289344b -n origin VG
  Logical volume "origin" created
[root@harding-03 ~]# lvcreate -n snap -c 8k -L 2304M -s VG/origin
  Reducing COW size 2.25 GiB down to maximum usable size 2.00 GiB.
WARNING: DM_snapshot_cow signature detected on /dev/VG/snap at offset 0. Wipe it? [y/n] y
  Wiping DM_snapshot_cow signature on /dev/VG/snap.
  Logical volume "snap" created
[root@harding-03 ~]# lvs -a -o +devices
  LV     VG  Attr       LSize  Origin Data%  Devices         
  origin VG  owi-a-s---  2.00g               /dev/sdb1(0)    
  snap   VG  swi-a-s---  2.00g origin   0.00 /dev/sdb1(511)  
[root@harding-03 ~]# dd if=/dev/zero of=/dev/VG/snap bs=1M oflag=direct
dd: error writing ‘/dev/VG/snap’: Input/output error
2044+0 records in
2043+0 records out
2142240768 bytes (2.1 GB) copied, 16.9193 s, 127 MB/s
[root@harding-03 ~]# dd if=/dev/VG/snap of=/tmp/foofile  bs=1M oflag=direct count=100
dd: error reading ‘/dev/VG/snap’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0694476 s, 0.0 kB/s
[root@harding-03 ~]# lvs -a -o +devices
  /dev/VG/snap: read failed after 0 of 4096 at 2143223808: Input/output error
  /dev/VG/snap: read failed after 0 of 4096 at 2143281152: Input/output error
  /dev/VG/snap: read failed after 0 of 4096 at 0: Input/output error
  /dev/VG/snap: read failed after 0 of 4096 at 4096: Input/output error
  LV     VG  Attr       LSize  Origin Data%  Devices         
  origin VG  owi-a-s---  2.00g               /dev/sdb1(0)    
  snap   VG  swi-I-s---  2.00g origin 100.00 /dev/sdb1(511)  

harding-03 kernel: [58068.989183] attempt to access beyond end of device
harding-03 kernel: [58068.994580] dm-6: rw=17, want=4194312, limit=4194304
harding-03 kernel: [58069.000148] attempt to access beyond end of device
harding-03 kernel: [58069.005517] dm-6: rw=17, want=4194320, limit=4194304
harding-03 kernel: [58069.011220] device-mapper: snapshots: Invalidating snapshot: Error reading/writing.
harding-03 kernel: [58069.027895] quiet_error: 55 callbacks suppressed
harding-03 kernel: [58069.034257] Buffer I/O error on device dm-4, logical block 523248
harding-03 kernel: [58069.041097] Buffer I/O error on device dm-4, logical block 523248
harding-03 kernel: [58069.049475] Buffer I/O error on device dm-4, logical block 523262
harding-03 kernel: [58069.057849] Buffer I/O error on device dm-4, logical block 523262
harding-03 kernel: [58069.064682] Buffer I/O error on device dm-4, logical block 0
harding-03 kernel: [58069.071025] Buffer I/O error on device dm-4, logical block 0
harding-03 kernel: [58069.077357] Buffer I/O error on device dm-4, logical block 1
harding-03 kernel: [58069.083705] Buffer I/O error on device dm-4, logical block 523263
harding-03 kernel: [58069.090536] Buffer I/O error on device dm-4, logical block 523263
harding-03 kernel: [58069.098881] Buffer I/O error on device dm-4, logical block 523263
harding-03 kernel: [58104.501653] quiet_error: 146 callbacks suppressed



AFTER FIX:

[root@harding-02 ~]# lvcreate -L 2143289344b -n origin VG
  Logical volume "origin" created
[root@harding-02 ~]# lvcreate -n snap -c 8k -L 2304M -s VG/origin
  Reducing COW size 2.25 GiB down to maximum usable size 2.00 GiB.
  Logical volume "snap" created
[root@harding-02 ~]# lvs -a -o +devices
  LV     VG  Attr       LSize  Origin Data%  Devices         
  origin VG  owi-a-s---  2.00g               /dev/sdb1(0)    
  snap   VG  swi-a-s---  2.00g origin   0.00 /dev/sdb1(511)  
[root@harding-02 ~]# dd if=/dev/zero of=/dev/VG/snap bs=1M oflag=direct
dd: error writing ‘/dev/VG/snap’: No space left on device
2045+0 records in
2044+0 records out
2143289344 bytes (2.1 GB) copied, 16.9464 s, 126 MB/s
[root@harding-02 ~]# dd if=/dev/VG/snap of=/tmp/foofile  bs=1M oflag=direct count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.90842 s, 115 MB/s
[root@harding-02 ~]# lvs -a -o +devices
  LV     VG  Attr       LSize  Origin Data%  Devices         
  origin VG  owi-a-s---  2.00g               /dev/sdb1(0)    
  snap   VG  swi-a-s---  2.00g origin  99.81 /dev/sdb1(511)

Comment 8 Ludek Smid 2014-06-13 11:04:06 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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