Browse Source

run a simple speed check on the drives of a zpool...

this assume the pool is somewhat quiet and I use this as somewhat
of a proxy of drive health..
main
John-Mark Gurney 4 years ago
parent
commit
1a7c97db80
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      zpoolspeedcheck

+ 17
- 0
zpoolspeedcheck View File

@@ -0,0 +1,17 @@
#!/bin/sh -

#echo start

readsize=512

for i in $( zpool list -v ztank | awk '$1 ~ /^label\// { print $1 }' ); do
barename="${i%.eli}"
i=/dev/${barename}
disksizemb=$(diskinfo "$i" | awk '{ print int($3 / 1024 / 1024) }')
#echo -n $i
inner=$(dd if="$i" bs=1m count="$readsize" of=/dev/null 2>&1 | awk 'END { print substr($7, 2) / 1024 / 1024 }')
middle=$(dd if="$i" bs=1m count="$readsize" iseek=$(($disksizemb / 2)) of=/dev/null 2>&1 | awk 'END { print substr($7, 2) / 1024 / 1024 }')
outer=$(dd if="$i" bs=1m count="$readsize" iseek=$(($disksizemb - "$readsize")) of=/dev/null 2>&1 | awk 'END { print substr($7, 2) / 1024 / 1024 }')
printf "%s\t%s\t%s\t%s\n" ${barename} $inner $middle $outer
done
#echo end

Loading…
Cancel
Save