# Plug-in operations tasks

This chapter discusses plug-in operations tasks and shows how to complete a plug-in task with the EVMS GUI, Ncurses, and CLI interfaces.

## What are plug-in tasks?

Plug-in tasks are functions that are available only within the context of a particular plug-in. These functions are not common to all plug-ins. For example, tasks to add spare disks to a RAID array make sense only in the context of the MD plug-in, and tasks to reset a snapshot make sense only in the context of the Snapshot plug-in.

## Example: complete a plug-in operations task

This section shows how to complete a plug-in operations task with the EVMS GUI, Ncurses, and CLI interfaces.

> ### Add a spare disk to a compatibility volume made from an MDRaid5 region

> This example adds disk `sde` as a spare disk onto volume `/dev/evms/md/md0`, which is a compatibility volume that was created from an MDRaid5 region.

### Using the EVMS GUI

Follow these steps to add `sde` to `/dev/evms/md/md0` with the EVMS GUI:

1. Select Other Storage Object Tasks...

2. Select md/md0.

3. Click Next.

4. Select Add spare object.

5. Click Next.

6. Select sde.

7. Click Add.

8. The operation is completed when you save.

Alternatively, you could use context-sensitive menus to complete the task, as follows:

1. View the region `md/md0`. You can view the region either by clicking on the small plus sign beside the volume name (`/dev/evms/md/md0`) on the volumes tab, or by selecting the regions tab.

2. Right click the region (`md/md0`). A list of acceptable Actions and Navigational shortcuts displays. The last items on the list are the tasks that are acceptable at this time.

3. Point to Add spare object and left click.

4. Select sde.

5. Click Add.

### Using Ncurses

Follow these steps to add `sde` to `/dev/evms/md/md0` with Ncurses:

1. Select Other Storage Object Tasks

2. Select md/md0.

3. Activate Next.

4. Select Add spare object.

5. Activate Next.

6. Select sde.

7. Activate Add.

Alternatively, you can use the context sensitive menu to complete the task:

1. From the Regions view, press Enter on md/md0.

2. Activate the Add spare object menu item.

3. Select sde.

4. Activate Add.

### Using the CLI

With the EVMS CLI, all plug-in tasks must be accomplished with the `task` command. Follow these steps to add `sde` to `/dev/evms/md/md0` with the CLI:

1. The following query command with the list options filter to determines the acceptable tasks for a particular object and the name-value pairs it supports. The command returns information about which plug-in tasks are available at the current time and provides the information necessary for you to complete the command.

       query: objects, object=md/md0, list options

2. The command takes the name of the task (returned from the previous query), the object to operate on (in this case, md/md0), any required options (none in this case) and, if necessary, another object to be manipulated (in our example, `sde`, which is the spare disk we want to add):

       task: addspare, md/md0, sde

   The command is completed upon saving.