tw_sched(1)
- 3ware ATA RAID Controller 7000 scheduler.
tw_sched [-h] tw_sched [-v] tw_sched -n -c configFile tw_sched -c configFile -p /path/tw_cli -a stop|start
tw_sched(1) is a wrapper around tw_cli(1). Used in conjunction with a time-driven schedulers such as crond(1d), it provides basic background task scheduling feature such as rebuild, verify, and Media Scan.
While this application can be executed manually, its intended use is to be submitted as a cronjob. For example to run a verify background task from 03:00 to 04:00 every day, submit the following cronjob. See crontab(1) for more.
# min hour dayOfMonth mon dayOfweek program 0 3 * * * /sbin/tw_sched -c /etc/tw_sched.cfg -p /sbin/tw_cli -a start 0 4 * * * /sbin/tw_sched -c /etc/tw_sched.cfg -p /sbin/tw_cli -a stop
Or you can use different config files for different tasks, as in
0 2 * * * /sbin/tw_sched -c /etc/verify.cfg -p /sbin/tw_cli -a start 0 3 * * * /sbin/tw_sched -c /etc/verify.cfg -p /sbin/tw_cli -a stop 0 4 * * * /sbin/tw_sched -c /etc/rebuild.cfg -p /sbin/tw_cli -a start 0 5 * * * /sbin/tw_sched -c /etc/rebuild.cfg -p /sbin/tw_cli -a stop
The following options are supported. Items in [xxx] are optional.
tw_cli(1)
as I did not want to assume or hunt for it.
Comments are supported; a line starting with #
.
# this is a comment
VERSION keyword indicates the configFile version. At this point its ignored but end user do not change this at will, you will confuse my parser.
Version = 1.0
task keyword indicates start of a directive. Directives can not span multiple physical lines. This is a version 1.0 limitation.
task = rebuild c0 u0 task = verify c1 u2 task = mediascan c1
tw_sched(1)
version 1.01 supports rebuild, verify, and MediaScan.
In order to start/stop a rebuild background task, the target unit must be in a
REBUILDING
state. In future an auto
feature will remedy this shortcoming.
Also verifying a unit requires the unit to be in a non-degraded, non-rebuilding
state.
Medi Montaseri, medi.montaseri@3ware.com
tw_cli(1).