Bug 994315
Summary: | Improve error message when failing to change the discard mode on active volume | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xiaowei Li <xiaoli> | |
Component: | lvm2 | Assignee: | Alasdair Kergon <agk> | |
lvm2 sub component: | Default / Unclassified | QA Contact: | Cluster QE <mspqa-list> | |
Status: | CLOSED CURRENTRELEASE | Docs Contact: | ||
Severity: | high | |||
Priority: | high | CC: | agk, cmarthal, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, qcai, thornber, zkabelac | |
Version: | 7.0 | Keywords: | Triaged | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | lvm2-2.02.103-1.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1003470 (view as bug list) | Environment: | ||
Last Closed: | 2014-06-13 12:10:03 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: | ||||
Bug Blocks: | 1003470 |
Description
Xiaowei Li
2013-08-07 03:24:00 UTC
#format_text/archiver.c:136 Archiving volume group "tsvg" metadata (seqno 61). #activate/dev_manager.c:478 Getting device info for tsvg-pool2-tpool [LVM-p9ndbUuxK6EZrInYsf912i7fyMDKxYbOdZ5wTa7JpkYudaYv5NvYrPjVVMeWaXgn-tpool] #ioctl/libdm-iface.c:1724 dm version OF [16384] (*1) #ioctl/libdm-iface.c:1724 dm info LVM-p9ndbUuxK6EZrInYsf912i7fyMDKxYbOdZ5wTa7JpkYudaYv5NvYrPjVVMeWaXgn-tpool NF [16384] (*1) #lvchange.c:124 Cannot change discards state for active pool volume "pool2". #lvchange.c:1123 <backtrace> As long as the pool is active - user can't change discards flag. However lvchange -an vgname/poolname only deactivates 'fake' pool target - which is used to manipulate with pool when no other thin volume is active. But as long as any thin volume is using given thin pool internal pool can't be deactivated. Admittedly the interface here is not very clean and rather confusing - but it's been side-step for clustered activation. So for now - there is technically no bug - but the information message is not the best and could provide more information - i.e. giving info about the number of active thin volumes using this pool - I'll think about that. So as a quick fix lvchange -an tsvg/lv2 will make the change of --discards possible. (In reply to Xiaowei Li from comment #0) [snip... pool2 was using discard mode of "nopassdown", pool2 is still active] > [root@dhcp12-156 tc]# lvchange --discards ignore tsvg/pool2 > Cannot change discards state for active pool volume "pool2". > > [root@dhcp12-156 tc]# lvchange --discards passdown tsvg/pool2 > Logical volume "pool2" changed. > > [root@dhcp12-156 tc]# lvs -o+discards tsvg > LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync > Convert Discards > lv1 tsvg Vwi-a-tz-- 100.00m pool1 0.00 > passdown > lv2 tsvg Vwi-a-tz-- 100.00m pool2 0.00 > passdown > lv3 tsvg Vwi---tz-k 100.00m pool1 lv1 > passdown > lv4 tsvg Vwi---tz-k 100.00m pool1 lv3 > passdown > pool1 tsvg twi-a-tz-- 100.00m 0.00 > passdown > pool2 tsvg twi---tz-- 104.00m 0.00 > passdown Both pool2 and lv2 are now using "passdown"; even though pool2 wasn't deactivated (so the kernel would not allow such a discard mode transition) (In reply to Zdenek Kabelac from comment #3) > As long as the pool is active - user can't change discards flag. > > However lvchange -an vgname/poolname only deactivates 'fake' pool target > - which is used to manipulate with pool when no other thin volume is active. > But as long as any thin volume is using given thin pool internal pool can't > be deactivated. > > Admittedly the interface here is not very clean and rather confusing - but > it's been side-step for clustered activation. > > So for now - there is technically no bug - but the information message is > not the best and could provide more information - i.e. giving info about > the number of active thin volumes using this pool - I'll think about that. > > So as a quick fix > > lvchange -an tsvg/lv2 > > will make the change of --discards possible. There is still a bug. lvm2 shouldn't allow a transition from "nopassdown" to "passdown" while the pool2 is active (and in-use by lv2). (In reply to Mike Snitzer from comment #7) > There is still a bug. lvm2 shouldn't allow a transition from "nopassdown" > to "passdown" while the pool2 is active (and in-use by lv2). Ngh, this isn't true. Discards are still enabled in that case. Just whether or not they are passed down to the underlying data device is what is being toggled. So lvm2 is doing the right thing here. Sorry for the noise. (In reply to Zdenek Kabelac from comment #3) > As long as the pool is active - user can't change discards flag. > > However lvchange -an vgname/poolname only deactivates 'fake' pool target > - which is used to manipulate with pool when no other thin volume is active. > But as long as any thin volume is using given thin pool internal pool can't > be deactivated. > > Admittedly the interface here is not very clean and rather confusing - but > it's been side-step for clustered activation. > > So for now - there is technically no bug - but the information message is > not the best and could provide more information - i.e. giving info about > the number of active thin volumes using this pool - I'll think about that. Probably only need to change the error message from: 'Cannot change discards state for active pool volume "pool2".' to: 'Cannot change discards support for active pool volume "pool2".' Subtle change, but "support" implies the overall discard capability (at least to me anyway). [root@virt-123 ~]# lvs -o+discards LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert Discards lv1 my_vg Vwi---tz-- 1.00g pool1 passdown pool1 my_vg twi-a-tz-- 1.00g 0.00 passdown root rhel_virt-123 -wi-ao---- 6.71g swap rhel_virt-123 -wi-ao---- 820.00m [root@virt-123 ~]# lvchange --discards ignore my_vg/pool1 Cannot change support for discards while pool volume "pool1" is active. [root@virt-123 ~]# lvchange -an my_vg/pool1 [root@virt-123 ~]# lvchange --discards ignore my_vg/pool1 Logical volume "pool1" changed. Disabling passdown while some part of the pool is active is not possible. The message should point in the right direction now. Marking VERIFIED with lvm2-2.02.105-2.el7.x86_64 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. |