Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Administrator's Guide   

Monitoring and Controlling Tasks


Note   Note    VxVM supports this feature for private disk groups, but not for shareable disk groups in a cluster environment.

The VxVM task monitor tracks the progress of system recovery by monitoring task creation, maintenance, and completion. The task monitor allows you to monitor task progress and to modify characteristics of tasks, such as pausing and recovery rate (for example, to reduce the impact on system performance).

Specifying Task Tags

Every task is given a unique task identifier. This is a numeric identifier for the task that can be specified to the vxtask utility to specifically identify a single task. Several VxVM utilities also provide a -t option to specify an alphanumeric tag of up to 16 characters in length. This allows you to group several tasks by associating them with the same tag.

The vxassist, vxevac, vxplex, vxmirror, vxrecover, vxrelayout, vxresize, vxsd, and vxvol utilities allow you to specify a tag using the -t option. For example, to execute a vxrecover command and track all the resulting tasks as a group with the task tag myrecovery, use the following command:


vxrecover -g mydg -t myrecovery -b mydg05 

Any tasks started by the utilities invoked by vxrecover also inherit its task ID and task tag, so establishing a parent-child task relationship.

For more information about the utilities that support task tagging, see their respective manual pages.

Managing Tasks with vxtask


Note   Note    New tasks take time to be set up, and so may not be immediately available for use after a command is invoked. Any script that operates on tasks may need to poll for the existence of a new task.

You can use the vxtask command to administer operations on VxVM tasks that are running on the system. Operations include listing tasks, modifying the state of a task (pausing, resuming, aborting) and modifying the rate of progress of a task. For detailed information about how to use vxtask, refer to the vxtask(1M) manual page.

VxVM tasks represent long-term operations in progress on the system. Every task gives information on the time the operation started, the size and progress of the operation, and the state and rate of progress of the operation. The administrator can change the state of a task, giving coarse-grained control over the progress of the operation. For those operations that support it, the rate of progress of the task can be changed, giving more fine-grained control over the task.

vxtask Operations

The vxtask command supports the following operations:

    abort Causes the specified task to cease operation. In most cases, the operations "back out" as if an I/O error occurred, reversing what has been done so far to the largest extent possible.
    list Lists tasks running on the system in one-line summaries. The -l option prints tasks in long format. The -h option prints tasks hierarchically, with child tasks following the parent tasks. By default, all tasks running on the system are printed. If a taskid argument is supplied, the output is limited to those tasks whose taskid or task tag match taskid. The remaining arguments are used to filter tasks and limit the tasks actually listed.
    monitor Prints information continuously about a task or group of tasks as task information changes. This allows you to track the progression of tasks. Specifying -l causes a long listing to be printed. By default, short one-line listings are printed. In addition to printing task information when a task state changes, output is also generated when the task completes. When this occurs, the state of the task is printed as EXITED.
    pause Puts a running task in the paused state, causing it to suspend operation.
    resume Causes a paused task to continue operation.
    set Changes modifiable parameters of a task. Currently, there is only one modifiable parameter, slow[=iodelay], which can be used to reduce the impact that copy operations have on system performance. If slow is specified, this introduces a delay between such operations with a default value for iodelay of 250 milliseconds. The larger the value of iodelay that is specified, the slower is the progress of the task and the fewer system resources that it consumes in a given time. (The slow attribute is also accepted by the vxplex, vxvol and vxrecover commands.)

vxtask Usage

To list all tasks currently running on the system, use the following command:


vxtask list

To print tasks hierarchically, with child tasks following the parent tasks, specify the -h option, as follows:


# vxtask -h list

To trace all tasks in the disk group, foodg, that are currently paused, as well as any tasks with the tag sysstart, use the following command:


vxtask -g foodg -p -i sysstart list

Use the vxtask -p list command lists all paused tasks, and use vxtask resume to continue execution (the task may be specified by its ID or by its tag):


# vxtask -p list
# vxtask resume 167

To monitor all tasks with the tag myoperation, use the following command:


vxtask monitor myoperation

To cause all tasks tagged with recovall to exit, use the following command:


vxtask abort recovall

This command causes VxVM to attempt to reverse the progress of the operation so far. For an example of how to use vxtask to monitor and modify the progress of the Online Relayout feature, see Controlling the Progress of a Relayout.

 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com