Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 583043 Details for
Bug 819943
RFE: Limit raid-check cron to a maximum number of concurrent checks
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to add MAXCONCURRENT
0001-Add-MAXCONCURRENT.patch (text/plain), 2.48 KB, created by
Orion Poplawski
on 2012-05-08 16:43:54 UTC
(
hide
)
Description:
Patch to add MAXCONCURRENT
Filename:
MIME Type:
Creator:
Orion Poplawski
Created:
2012-05-08 16:43:54 UTC
Size:
2.48 KB
patch
obsolete
>From 8133203b4ea635525448917a945e5473c013ba2d Mon Sep 17 00:00:00 2001 >From: Orion Poplawski <orion@cora.nwra.com> >Date: Tue, 8 May 2012 10:31:14 -0600 >Subject: [PATCH] Add MAXCONCURRENT > >--- > mdadm-raid-check-sysconfig | 3 +++ > raid-check | 36 ++++++++++++++++++++++++------------ > 2 files changed, 27 insertions(+), 12 deletions(-) > >diff --git a/mdadm-raid-check-sysconfig b/mdadm-raid-check-sysconfig >index ecb4005..365278e 100644 >--- a/mdadm-raid-check-sysconfig >+++ b/mdadm-raid-check-sysconfig >@@ -34,6 +34,8 @@ > # NICE - Change the raid check CPU and IO priority in order to make > # the system more responsive during lengthy checks. Valid > # values are high, normal, low, idle. >+# MAXCONCURENT - Limit the number of devices to be checked at a time. >+# By default all devices will be checked at the same time. > # > # Note: the raid-check script is run by the /etc/cron.d/raid-check cron job. > # Users may modify the frequency and timing at which raid-check is run by >@@ -51,3 +53,4 @@ NICE=low > CHECK_DEVS="" > REPAIR_DEVS="" > SKIP_DEVS="" >+MAXCONCURRENT= >diff --git a/raid-check b/raid-check >index 829dc58..8ac546d 100644 >--- a/raid-check >+++ b/raid-check >@@ -11,6 +11,24 @@ > [ -f /etc/sysconfig/raid-check ] || exit 0 > . /etc/sysconfig/raid-check > >+# Wait until no more than arg1 arrays in arg2 list are busy >+waitbusy() { >+ local threshold=$(($1 + 1)) >+ local dev_list="$2" >+ while true >+ do >+ local busy=0 >+ for dev in $dev_list; do >+ sync_action=`cat /sys/block/$dev/md/sync_action` >+ if [ "$sync_action" != "idle" ]; then >+ let busy++ >+ fi >+ done >+ [ $busy -lt $threshold ] && break >+ sleep 60 >+ done >+} >+ > [ "$ENABLED" != "yes" ] && exit 0 > > case "$CHECK" in >@@ -70,6 +88,10 @@ done > [ -z "$dev_list" ] && exit 0 > > for dev in $dev_list; do >+ #Only run $MAXCONCURRENT checks at a time >+ if [ -n "$MAXCONCURRENT" ]; then >+ waitbusy $((MAXCONCURRENT - 1)) "$dev_list" >+ fi > echo "${check[$dev]}" > /sys/block/$dev/md/sync_action > > resync_pid="" >@@ -86,18 +108,8 @@ for dev in $dev_list; do > done > [ -z "$check_list" ] && exit 0 > >-checking=1 >-while [ $checking -ne 0 ] >-do >- sleep 60 >- checking=0 >- for dev in $check_list; do >- sync_action=`cat /sys/block/$dev/md/sync_action` >- if [ "$sync_action" != "idle" ]; then >- checking=1 >- fi >- done >-done >+waitbusy 0 "$check_list" >+ > for dev in $check_list; do > mismatch_cnt=`cat /sys/block/$dev/md/mismatch_cnt` > # Due to the fact that raid1/10 writes in the kernel are unbuffered, >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 819943
:
583043
|
587768