Closed asg7443 closed 8 years ago
Hi, thanks for sharing.
But it shows DRBD disks for example: ls
$ ls -l /dev/disk/by-id/ | cut -d"/" -f3 | sort -n | uniq -w 3
dm-0
sda
sr0
total 0
lsblk
$ /bin/lsblk -d -n -o NAME
sr0
sda
drbd1
drbd2
drbd3
Fixed. Probably there are other device types which don't support SMART (see http://www.lanana.org/docs/device-list/devices-2.6+.txt) but I think it doesn't make sense to try to exclude them all since they should be filtered by '{#SMART_ENABLED}' in Zabbix template.
@asg7443 , what do you think about using smartctl --scan
?
There are cases when lsblk is not available: http://askubuntu.com/questions/434150/is-lsblk-not-available-for-ubuntu10-04
Well, it's pretty natural way to do it. How did we miss it earlier?.. :)
It seems to me using lsblk is simpler and it's output doesn't include virtual devices like md0.