From: Peter Rabbitson <rabbit+list@rabbit.us>
To: Billy Crook <billycrook@gmail.com>
Cc: Jon@ehardcastle.com,
"Kristleifur Daðason" <kristleifur@gmail.com>,
linux-raid@vger.kernel.org
Subject: Re: Raid 5 to 6 reshape q
Date: Sun, 03 Jan 2010 21:34:43 +0100 [thread overview]
Message-ID: <4B40FF63.3090302@rabbit.us> (raw)
In-Reply-To: <a43edf1b1001031214m6a4bea69ja17508b7da41efbd@mail.gmail.com>
Billy Crook wrote:
> Here's a couple trivial scripts I've used to pause execution until a
> sync is completed. They are handy for when you want to do multiple
> grow operations, each no sooner than after the previous completed.
> Modify for your own purposes.
>
> [root@Eight bin]# cat raid-wait-till-sync-finish
> #! /bin/bash
>
> export interval=300
>
> if [[ $1 -gt 0 ]]
> then
> interval=$1
> fi
>
> echo -n Checking every ${interval} seconds for raid sync to finish.
>
> while [[ $( cat /sys/block/md*/md/sync_action | \
> grep -v idle | \
> wc -l ) -gt 0 ]]
> do
> echo -n .
> sleep ${interval}
> done
>
> echo Raid System Healthy!
>
> exit 0
> [root@Eight bin]# cat raid-wait-till-all-healthy
> #! /bin/bash
>
> export clean=no
> while [[ $clean==no ]]
> do
> #set clean to yes
> clean=yes
>
> #Give each array the chance to set clean to no
> for array in `ls -1 /sys/block/md*/md -d`
> do
>
> if [[ $( cat $array/raid_disks ) -gt $( ls -1 $array/ | grep
> ^rd[0-9]*$ | wc -l ) ]]
> then
> echo $array is still unclean
> clean=no
> fi
> done
> sleep 5
> done
>
Both of these can be replaced by mdadm --wait $device
prev parent reply other threads:[~2010-01-03 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 8:52 Raid 5 to 6 reshape q Jon Hardcastle
2010-01-02 12:08 ` John Robinson
2010-01-02 12:19 ` Kristleifur Daðason
2010-01-03 18:07 ` Jon Hardcastle
2010-01-03 20:14 ` Billy Crook
2010-01-03 20:34 ` Peter Rabbitson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B40FF63.3090302@rabbit.us \
--to=rabbit+list@rabbit.us \
--cc=Jon@ehardcastle.com \
--cc=billycrook@gmail.com \
--cc=kristleifur@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.