summaryrefslogtreecommitdiffstats
path: root/raid-check
diff options
context:
space:
mode:
Diffstat (limited to 'raid-check')
-rwxr-xr-xraid-check15
1 files changed, 11 insertions, 4 deletions
diff --git a/raid-check b/raid-check
index 2b7f7f2..81d3876 100755
--- a/raid-check
+++ b/raid-check
@@ -1,5 +1,12 @@
-#!/bin/sh
+#!/bin/bash
+
+if (($#>0)); then
+ for d in "$@"; do
+ echo check > /sys/block/$d/md/sync_action
+ done
+else
+ for f in /sys/block/md*/md/sync_action; do
+ echo check > $f
+ done
+fi
-for f in /sys/block/md*/md/sync_action; do
- echo check > $f
-done