diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-04-26 20:00:34 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-04-26 20:00:34 (GMT) |
commit | 168df166590c264c05a7385776d80c30591a6ba6 (patch) | |
tree | 32db16ae2a0fb40703acaacdd0997b92ca3fb57b /abs/core/xymon/xymon-smart.sh | |
parent | 9c617a99340541fdd9caea24d89a75dd25fbd071 (diff) | |
download | linhes_pkgbuild-168df166590c264c05a7385776d80c30591a6ba6.zip linhes_pkgbuild-168df166590c264c05a7385776d80c30591a6ba6.tar.gz linhes_pkgbuild-168df166590c264c05a7385776d80c30591a6ba6.tar.bz2 |
xymon: closes #1012
Diffstat (limited to 'abs/core/xymon/xymon-smart.sh')
-rwxr-xr-x | abs/core/xymon/xymon-smart.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/abs/core/xymon/xymon-smart.sh b/abs/core/xymon/xymon-smart.sh index 7c10db5..8998778 100755 --- a/abs/core/xymon/xymon-smart.sh +++ b/abs/core/xymon/xymon-smart.sh @@ -4,7 +4,7 @@ if test -f /tmp/dres; then rm -f /tmp/dres; fi -ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' | +ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' -ve '/md-' | while read DISK do DISKDEV=`ls -l $DISK | awk -F/ '{print $NF}'` @@ -18,7 +18,11 @@ do #check if device is mounted if ! mount | grep -q /dev/$DISKDEV then - continue + # check if device is used by mdadm + if ! cat /proc/mdstat | grep -q $DISKDEV + then + continue + fi fi DRES=`sudo /usr/bin/smartctl -H -n standby $DISK` |