summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/xymon-smart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/xymon/xymon-smart.sh')
-rwxr-xr-xabs/core/xymon/xymon-smart.sh8
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`