Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading data may be reported for device-mapper block devices #386

Open
nixsum opened this issue Feb 6, 2024 · 1 comment
Open

Misleading data may be reported for device-mapper block devices #386

nixsum opened this issue Feb 6, 2024 · 1 comment

Comments

@nixsum
Copy link

nixsum commented Feb 6, 2024

The minor number of dm devices may change after system reboot if they initialize in a different order or simply after a device is removed, for example a logical volume. This will cause the "-p" flag to print wrong information.

For example, here I've generated load on logical volume "rl-a", it's minor number is 3

03:50:21 PM rl-a 77.23 0.08 150092.47 1943.42 5.02 64.96 4.96 38.35
03:50:21 PM rl-b 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
03:50:21 PM rl-c 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
03:50:21 PM rl-d 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

After I delete the rl-a logical volume and reboot the system sar will falsely report that rl-b was under load as it will take minor number 3

03:50:21 PM rl-b 77.23 0.08 150092.47 1943.42 5.02 64.96 4.96 38.35
03:50:21 PM rl-c 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
03:50:21 PM rl-d 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0

I have had this happen before without having to delete volumes, just a reboot was enough to change the order, but I'm unable to reproduce it.

sysstat version here is 11.7.3

@sysstat
Copy link
Owner

sysstat commented Feb 10, 2024

Try to use option -j to display persistent device names with sar.
Version 12.1.7 added stable identifier support for disks statistics. This stable identifier won't change across reboots for the same physical device. If it exists, this identifier is normally the WWN (World Wide Name) of the device, as read from the /dev/disk/by-id directory:

$ sar -d -j SID

08:10:30          tps     rkB/s     wkB/s     dkB/s   areq-sz    aqu-sz     await     %util DEV
08:15:30         5.61    186.75     11.27      0.00     35.30      0.01      0.96      0.38 0x538f6016100c3ec7
(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants