Bug 1286282 - dmstats: support non-dm devices for stats create
dmstats: support non-dm devices for stats create
Status: NEW
Product: LVM and device-mapper
Classification: Community
Component: lvm2 (Show other bugs)
2.02.172
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: LVM and device-mapper development team
cluster-qe@redhat.com
: FutureFeature
: 1286283 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-27 13:08 EST by Bryn M. Reeves
Modified: 2017-07-19 08:02 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: lvm‑technical‑solution?
rule-engine: lvm‑test‑coverage?


Attachments (Terms of Use)

  None (edit)
Description Bryn M. Reeves 2015-11-27 13:08:17 EST
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 05:06:42 EST
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 10:04:37 EST
lvm2 would be a separate request - outside the scope of this bugzilla
Comment 3 Jonathan Earl Brassow 2016-12-21 15:55:16 EST
*** Bug 1286283 has been marked as a duplicate of this bug. ***
Comment 4 Alasdair Kergon 2017-07-19 07:51:48 EDT
Moving feature request from RHEL to upstream.
Comment 5 Alasdair Kergon 2017-07-19 07:59:36 EDT
Added dmstats subcomponent
Comment 6 Alasdair Kergon 2017-07-19 08:02:46 EDT
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.