Bug 1066977
| Summary: | lvm2 calculates snapshot space incorrectly | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Zdenek Kabelac <zkabelac> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| lvm2 sub component: | Default / Unclassified | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | CC: | agk, cmarthal, coughlan, dwysocha, heinzm, jbrassow, mpatocka, msnitzer, prajnoha, prockai, thornber, zkabelac |
| Version: | 7.0 | Keywords: | Triaged |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.105-8.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1035871 | Environment: | |
| Last Closed: | 2014-06-13 11:04:06 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1035871 | ||
| Bug Blocks: | |||
|
Comment 2
Zdenek Kabelac
2014-02-26 13:58:10 UTC
One more patch needed for a fix here, it's included in lvm2-2.02.105-8.el7. Upstream test case: https://www.redhat.com/archives/lvm-devel/2014-March/msg00045.html 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) 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. |