Bug 908792
| Summary: | Add support to lvs to display more status information about thin pools | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Zdenek Kabelac <zkabelac> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 6.5 | CC: | agk, cmarthal, dwysocha, heinzm, jbrassow, msnitzer, prajnoha, prockai, rbednar, thornber, tlavigne, zkabelac |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.143-1.el6 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-11 01:14:27 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: | 1310661 | ||
| Bug Blocks: | |||
|
Description
Zdenek Kabelac
2013-02-07 14:36:29 UTC
We already have new characters in the lv_attr field which signify various thin pool states. It's the "health status" part there, from lvs man page:
Related to thin pool Logical Volumes: (F)ailed, out of (D)ata space, (M) read only.
(F)ailed is set if thin pool encounters serious failures and hence no further I/O is permitted at all. The out of (D)ata space is set if thin pool has run out of data space. (M) read only
signifies that thin pool encounters certain types of failures but it's still possible to do reads at least, but no metadata changes are allowed.
As for the discards mode actually used in kernel, we have a new "kernel_discards" field now to make a difference between metadata and kernel value:
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=b82d5ee0926acee37356f5a322edbb4694081699
Ok - there has been couple related bugs. First - whenever you see 'X' - it's sing there is something going wrong - so getting 'X' is likely a reason to open new BZ. Now - I've posted patchset which fixes some parsing issues for thin and thin-pool targets - so now the 'F' could be properly reported. The way I trigger this to appear on lvm2 test suite is - to use 'error' blocks right after header of metadata devices (4th sector - using 2 error sectors). So here are links for patches: https://www.redhat.com/archives/lvm-devel/2016-February/msg00078.html https://www.redhat.com/archives/lvm-devel/2016-February/msg00079.html https://www.redhat.com/archives/lvm-devel/2016-February/msg00080.html https://www.redhat.com/archives/lvm-devel/2016-February/msg00081.html https://www.redhat.com/archives/lvm-devel/2016-February/msg00083.html Here is the link for actual test: https://www.redhat.com/archives/lvm-devel/2016-February/msg00082.html So now - do we need a new BZ - or we will squeeze fixes into current release ? Verified using latest packages.
2.6.32-625.el6.x86_64
lvm2-2.02.143-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
lvm2-libs-2.02.143-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
lvm2-cluster-2.02.143-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
udev-147-2.72.el6 BUILT: Tue Mar 1 13:14:05 CET 2016
device-mapper-1.02.117-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
device-mapper-libs-1.02.117-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
device-mapper-event-1.02.117-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
device-mapper-event-libs-1.02.117-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
device-mapper-persistent-data-0.6.2-0.1.rc5.el6 BUILT: Wed Feb 24 14:07:09 CET 2016
cmirror-2.02.143-1.el6 BUILT: Wed Feb 24 14:59:50 CET 2016
Results:
Test "kernel_discards" attribute:
# lvs -o +discards,kernel_discards
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Discards KDiscards
POOL vg twi-aotz-- 1.00g 0.00 41.41 passdown nopassdown
test_lv1 vg Vwi-a-tz-- 1.00m POOL 0.00 passdown
Test "out of (D)ata space" lv_attr:
# dd if=/dev/zero of=/dev/vg/test_lv2 bs=4M count=100
100+0 records in
100+0 records out
419430400 bytes (419 MB) copied, 61.7342 s, 6.8 MB/s
# lvs -a
WARNING: /dev/vg/test_lv: Thin's thin-pool needs inspection.
WARNING: /dev/vg/test_lv2: Thin's thin-pool needs inspection.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
POOL vg twi-aotzD- 1.00g 100.00 13.77
[POOL_tdata] vg Twi-ao---- 1.00g
[POOL_tmeta] vg ewi-ao---- 4.00m
[lvol0_pmspare] vg ewi------- 4.00m
test_lv vg Vwi-a-tz-- 1004.00m POOL 99.20
test_lv2 vg Vwi-a-tz-- 1000.00m POOL 2.80
lv_root vg_virt024 -wi-ao---- 6.79g
lv_swap vg_virt024 -wi-ao---- 824.00m
Test "(M) read only" lv_attr:
--->reached thin pool metadata capacity
# lvcreate -V 1M --name test_lv2 --thin vg/POOL
device-mapper: message ioctl on (253:4) failed: Operation not supported
Failed to process thin pool message "delete 488".
Failed to suspend and send message vg/POOL.
# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
POOL vg twi-aotzM- 1.00g 0.00 98.83
[POOL_tdata] vg Twi-ao---- 1.00g
Test "(F)ailed" lv_attr:
# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
POOL vg twi-aotz-- 10.00g 0.00 0.65 POOL_tdata(0)
[POOL_tdata] vg Twi-ao---- 10.00g /dev/sda(3)
[POOL_tmeta] vg ewi-ao---- 12.00m /dev/sda(2563)
[lvol0_pmspare] vg ewi------- 12.00m /dev/sda(0)
lvol1 vg Vwi-a-tz-- 5.00g POOL 0.00
lv_root vg_virt025 -wi-ao---- 6.79g /dev/vda2(0)
lv_swap vg_virt025 -wi-ao---- 824.00m /dev/vda2(1737)
# dmsetup suspend vg-POOL_tmeta
# dmsetup load vg-POOL_tmeta --table "0 24576 error 8:0 2048"
# dmsetup resume vg-POOL_tmeta
# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
POOL vg twi-aotzF- 10.00g POOL_tdata(0)
[POOL_tdata] vg Twi-ao---- 10.00g /dev/sda(3)
[POOL_tmeta] vg ewi-ao---- 12.00m /dev/sda(2563)
[lvol0_pmspare] vg ewi------- 12.00m /dev/sda(0)
lvol1 vg Vwi-a-tzF- 5.00g POOL
lv_root vg_virt025 -wi-ao---- 6.79g /dev/vda2(0)
lv_swap vg_virt025 -wi-ao---- 824.00m
NOTE: putting device into failed state as show above might result in kernel panic as described in bug 1305983 and bug 1310661
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0964.html |