Skip to content

Inconsistent disks' device label value (when using Device-mapper, LVM ...) #885

@finkr

Description

@finkr

Host operating system:

Linux slxhmhs1 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux  

node_exporter version:

node_exporter, version 0.13.0+ds (branch: debian/sid, revision: 0.13.0+ds-1+b2)                                                  
  build user:       pkg-go-maintainers@lists.alioth.debian.org                                                                   
  build date:       20170429-09:20:49                                                                                            
  go version:       go1.7.4                                                                                                      

node_exporter command line flags

/usr/bin/prometheus-node-exporter 
  -collector.diskstats.ignored-devices=^(ram|loop|fd)d+$
  -collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/)
  -collector.textfile.directory=/var/lib/prometheus/node-exporter 

Are you running node_exporter in Docker?

No

What did you do that produced an error?

Just browse node-exporter's /metrics on a machine with LVM (or any other Device Mapper based storage)

What did you expect to see?

  • Consistent label values for disk that use device-mapper (like LVM).
    And also consider:
  • expose user-friendly device name (label values) for disk that use device-mapper.
  • Expose more informations about LVM (LV -> VG mapping, PV->VG mapping ...)

What did you see instead?

The label value for device= aren't consistent for node_filesystem_.* and node_disk_.*.
Also, node_disk_.* aren't user friendly / explicit.

node_filesystem_avail{device="/dev/mapper/vg1-lvroot",fstype="ext4",mountpoint="/"}

but:

node_disk_bytes_read{device="dm-0"} 
node_disk_bytes_written{device="dm-0"}
node_disk_io_now{device="dm-0"} 0

This is probably tough, since a device can have multiple names, see dmsetup info or

$find -L /dev -samefile /dev/dm-0                                                                                
/dev/vg1/lvroot
/dev/dm-0                                                                                                                        
/dev/mapper/vg1-lvroot
/dev/disk/by-uuid/620dd05c-beef-beef-beef-cafecafecafe
/dev/disk/by-id/dm-uuid-LVM-HB5blablablablahw                                     
/dev/disk/by-id/dm-name-vg1-lvroot 
/dev/block/254:0

(Keywords: LVM, volume group, logical volume, lv, vg, mirror, raid, multipath, crypt)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions