microsoft / SCXcore

System Center Cross Platform Provider for Operations Manager
Microsoft Public License
36 stars 31 forks source link

SCX_DiskDriveStatisticalInformation does not detect drives attached to RAID #88

Closed rossanov closed 6 years ago

rossanov commented 7 years ago

OMI tables _SCXDiskDrive and _SCXDiskDriveStatisticalInformation are showling all disk drives except the ones behind a RAID 0. Disk Stats seems to be correctly populated, but the omi is not aligned with it.

This issue prevents other Azure Extensions like Linux Azure Diagnostic 3.0 to collect disk metrics and potentially detect Throttling at Disk Level.


In sample below, disk drives 'sdd' and 'sdf' are configured in a RAID 0 array with mdadm, and mounted on ‘/p10_RAID’.

OS : Ubuntu Linux 16.04 LTS Attached 4 data disks to VM:

# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
fd0         2:0    1     4K  0 disk
sda         8:0    0    30G  0 disk
└─sda1      8:1    0    30G  0 part  /
sdb         8:16   0    14G  0 disk
└─sdb1      8:17   0    14G  0 part  /mnt
sdc         8:32   0  1023G  0 disk
└─sdc1      8:33   0  1023G  0 part  /p30
sdd         8:48   0   127G  0 disk
└─sdd1      8:49   0   127G  0 part
  └─md127   9:127  0 253.9G  0 raid0 /p10_RAID
sde         8:64   0   511G  0 disk
└─sde1      8:65   0   511G  0 part  /p20
sdf         8:80   0   127G  0 disk
└─sdf1      8:81   0   127G  0 part
  └─md127   9:127  0 253.9G  0 raid0 /p10_RAID

Below system disk stats information:

# cat /proc/diskstats
   7       0 loop0 0 0 0 0 0 0 0 0 0 0 0
   7       1 loop1 0 0 0 0 0 0 0 0 0 0 0
   7       2 loop2 0 0 0 0 0 0 0 0 0 0 0
   7       3 loop3 0 0 0 0 0 0 0 0 0 0 0
   7       4 loop4 0 0 0 0 0 0 0 0 0 0 0
   7       5 loop5 0 0 0 0 0 0 0 0 0 0 0
   7       6 loop6 0 0 0 0 0 0 0 0 0 0 0
   7       7 loop7 0 0 0 0 0 0 0 0 0 0 0
   2       0 fd0 3 0 24 144 0 0 0 0 0 144 144
   8       0 sda 9290 1 678663 96092 13517 16015 699864 53708 0 62752 149784
   8       1 sda1 9258 1 676551 96056 13514 16015 699864 53708 0 62720 149748
   8      16 sdb 413 0 29354 168 763 33446 30086720 210760 0 2804 210928
   8      17 sdb1 118 0 9506 68 763 33446 30086720 210760 0 2748 210828
   8      80 sdf 309 0 12080 1780 0 0 0 0 0 1148 1776
   8      81 sdf1 283 0 10016 1592 0 0 0 0 0 1008 1588
   8      32 sdc 329 0 19746 1968 3 0 24 12 0 1616 1980
   8      33 sdc1 296 0 17626 1716 3 0 24 12 0 1432 1728
   8      48 sdd 249 0 12570 312 3 0 24 28 0 332 340
   8      49 sdd1 223 0 10506 264 3 0 24 28 0 284 292
   8      64 sde 296 0 19482 1824 3 0 24 12 0 1468 1836
   8      65 sde1 263 0 17362 1628 3 0 24 12 0 1304 1640
   9     126 md126 293 0 15730 0 5 0 24 0 0 0 0
# ls -l /sys/block
total 0
lrwxrwxrwx 1 root root 0 Sep 22 15:57 fd0 -> ../devices/platform/floppy.0/block/fd0
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 Sep 22 15:57 loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 Sep 22 12:28 md126 -> ../devices/virtual/block/md126
lrwxrwxrwx 1 root root 0 Sep 22 12:28 sda -> ../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/00000000-0000-8899-0000-000000000000/host2/ta                                                                                  rget2:0:0/2:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Sep 22 12:28 sdb -> ../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/00000000-0001-8899-0000-000000000000/host3/ta                                                                                  rget3:0:1/3:0:1:0/block/sdb
lrwxrwxrwx 1 root root 0 Sep 22 12:28 sdc -> ../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/f8b3781b-1e82-4818-a1c3-63d806ec15bb/host5/ta                                                                                  rget5:0:0/5:0:0:0/block/sdc
lrwxrwxrwx 1 root root 0 Sep 22 12:28 sdd -> ../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/f8b3781b-1e82-4818-a1c3-63d806ec15bb/host5/ta                                                                                  rget5:0:0/5:0:0:3/block/sdd
lrwxrwxrwx 1 root root 0 Sep 22 12:28 sde -> ../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/f8b3781b-1e82-4818-a1c3-63d806ec15bb/host5/ta                                                                                  rget5:0:0/5:0:0:1/block/sde
lrwxrwxrwx 1 root root 0 Sep 22 12:28 sdf -> ../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/f8b3781b-1e82-4818-a1c3-63d806ec15bb/host5/ta                                                                                  rget5:0:0/5:0:0:2/block/sdf

Below the OMI query:

# /opt/omi/bin/omicli cql root/scx "select Name from scx_diskdrivestatisticalinformation"
instance of SCX_DiskDriveStatisticalInformation
{
    [Key] Name=sda
}
instance of SCX_DiskDriveStatisticalInformation
{
    [Key] Name=md
}
instance of SCX_DiskDriveStatisticalInformation
{
    [Key] Name=sdc
}
instance of SCX_DiskDriveStatisticalInformation
{
    [Key] Name=sde
}
instance of SCX_DiskDriveStatisticalInformation
{
    [Key] Name=sdb
}
instance of SCX_DiskDriveStatisticalInformation
{
    [Key] Name=_Total
}
# /opt/omi/bin/omicli cql root/scx "select Name from SCX_DiskDrive"
instance of SCX_DiskDrive
{
    Name=sda
}
instance of SCX_DiskDrive
{
    Name=md
}
instance of SCX_DiskDrive
{
    Name=sdc
}
instance of SCX_DiskDrive
{
    Name=sde
}
instance of SCX_DiskDrive
{
    Name=sdb
}
sarojcare commented 6 years ago

As discussed it is by design to show md device instead individual disks.