Bug 1286282 - [RFE] dmstats: support non-dm devices for stats create
Summary: [RFE] dmstats: support non-dm devices for stats create
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.172
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
: 1286283 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-27 18:08 UTC by Bryn M. Reeves
Modified: 2023-08-10 15:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Bryn M. Reeves 2015-11-27 18:08:17 UTC
Description of problem:
Device-mapper IO statistics can be used with any block device providing a dm-linear layer is mapped over the underlying device, e.g.:

# dmsetup create sda --table="0 2048 linear 8:0"
# dmstats create sda
# < ... do stuff ... >
# dmstats delete sda
# dmsetup remove sda

Doing so is tedious and requires the user to have knowledge of device-mapper targets and table syntax.

By providing the ability to automatically create the linear map when required (and when the requested device is idle) the use of device-mapper statistics with non device-mapper devices is considerably simplified.

Version-Release number of selected component (if applicable):
lvm2-2.02.127-*.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. dmstats create /dev/sda

Actual results:
# dmstats create /dev/sda
Device sda not found
Command failed

Expected results:
* creates dm device "sda"
* registers requested stats regions on dm device "sda" 

Additional info:

Comment 1 Zdenek Kabelac 2015-11-30 10:06:42 UTC
Hmm, while I can understand motivation  IMHO it's better for a user to 'convert' to lvm2 - it might not obvious on the first sight but in fact you would need to provide  'stacked' device from 'boot' moment.

IMHO we could probably make it more easier is to add capability to switch any device into lvm2 device - there is in fact lot's of 'hidden' code in lvm2 to actually support this - but it's awkward to use.

While there could be some 'use' for  'unused' devices - so before the use the user can use 'linear' mapping instead of real device, but there are still lots of 'security' issue connected to this - so IMHO such solution could be only seen as a temporary hack to do things in quick but highly unsecure way.

Comment 2 Alasdair Kergon 2015-11-30 15:04:37 UTC
lvm2 would be a separate request - outside the scope of this bugzilla

Comment 3 Jonathan Earl Brassow 2016-12-21 20:55:16 UTC
*** Bug 1286283 has been marked as a duplicate of this bug. ***

Comment 4 Alasdair Kergon 2017-07-19 11:51:48 UTC
Moving feature request from RHEL to upstream.

Comment 5 Alasdair Kergon 2017-07-19 11:59:36 UTC
Added dmstats subcomponent

Comment 6 Alasdair Kergon 2017-07-19 12:02:46 UTC
Might be clearer to start by providing a command that just wraps a linear mapping around a given device, subject to certain conditions.  We might also be able to build this into the boot process as a substitute for the original device.


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