NAME

tw_sched(1) - 3ware ATA RAID Controller 7000 scheduler.


SYNOPSIS

 tw_sched [-h] 
 tw_sched [-v] 
 tw_sched -n -c configFile 
 tw_sched -c configFile -p /path/tw_cli -a stop|start


DESCRIPTION

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


OPTIONS

The following options are supported. Items in [xxx] are optional.

-h
Provides a brief help screen.

-v
Reports tw_sched(1)s version.

-n
Runs a syntax check on the ConfigFile without actually executing the instructions.

-a start|stop
Action is either start or stop. While start instructs the controller to begin (or resume) task(s), stop ends or pauses task(s).

-p /path/tw_cli
Specifies path to tw_cli(1) as I did not want to assume or hunt for it.

-c configFile
Specifies path to a configuration file containing one or many scheduling directives (or tasks). Version 1.0 of this configuration file supports the following:

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.


BUGS

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.


AUTHOR

Medi Montaseri, medi.montaseri@3ware.com


SEE ALSO

tw_cli(1).