0% found this document useful (0 votes)
88 views10 pages

CLI - Scheduler & Virtual Lock Lab

The document provides instructions for using the InServ CLI to configure scheduling and virtual locks. It includes steps to: 1. Create a CPG and two virtual volumes with virtual locks for retention and expiration times. 2. Create recurring and one-time schedules to take snapshots of the virtual volumes on a schedule. 3. View, suspend, resume, modify, and remove schedules and view task statuses. 4. View and modify the virtual lock settings for virtual volumes, the InServ system, and domains.

Uploaded by

purush_123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views10 pages

CLI - Scheduler & Virtual Lock Lab

The document provides instructions for using the InServ CLI to configure scheduling and virtual locks. It includes steps to: 1. Create a CPG and two virtual volumes with virtual locks for retention and expiration times. 2. Create recurring and one-time schedules to take snapshots of the virtual volumes on a schedule. 3. View, suspend, resume, modify, and remove schedules and view task statuses. 4. View and modify the virtual lock settings for virtual volumes, the InServ system, and domains.

Uploaded by

purush_123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CLI – Scheduler & Virtual Lock Lab

CLI – Scheduler & Virtual Lock Lab

Page 1
CLI – Scheduler & Virtual Lock Lab

Table of Contents
Step 1: Log into the InServ utilizing InForm CLI ........................................................................................ 3
Enter the IP address or DNS name of the InServ and then user with password ..................................... 3
There Are Three Different Ways to Run CLI Commands ....................................................................... 3
Execute the Commands from the TCL Shell ...................................................................................... 3
Execute the Commands from an OS Shell ......................................................................................... 3
Execute the Commands from a Script .............................................................................................. 3
Step 2: Create a Schedule ....................................................................................................................... 4
Create a CPG ....................................................................................................................................... 4
Create a Virtual Volume with a Virtual Lock ......................................................................................... 4
Create another Virtual Volume with a Virtual Lock............................................................................... 4
Create Schedule to Create Virtual Copies on a Recurring Basis ............................................................. 5
Step 3: Create a “One Time Only” Schedule ............................................................................................ 6
Confirm Schedule and View Status....................................................................................................... 6
Suspend or Resume a Schedule ........................................................................................................... 6
Change or Modify a Schedule .............................................................................................................. 6
Step 4: View Task Status ......................................................................................................................... 7
Cancel or Modify Tasks ........................................................................................................................ 7
Step 6: Remove a Schedule ..................................................................................................................... 8
Step 7: View and Modify Virtual Locks .................................................................................................... 9
View Virtual Volume Virtual Lock Settings............................................................................................ 9
Modify Virtual Volume Virtual Lock Settings ........................................................................................ 9
View InServ System Virtual Lock Settings ............................................................................................. 9
Modify InServ System Virtual Lock Settings .......................................................................................... 9
View Domain Virtual Lock Settings ..................................................................................................... 10
Modify Domain Virtual Lock Settings ................................................................................................. 10
Modify Virtual Locks in the GUI ............................................................................................................. 10
How can you remove a Virtual Volume with a Retention Time? ......................................................... 10

Page 2
CLI – Scheduler & Virtual Lock Lab

Step 1: Log into the InServ utilizing InForm CLI

2.3.1 is the version used in the screenshots

Enter the IP address or DNS name of the InServ and then user with password

Make sure you login with super user permissions

Successful login will display the CLI prompt for the InServ desired

Here is the prompt from the screenshot example above:

mktg-ins2 cli%
NOTE: The mangler is a user level program running on each node. The mangler is responsible for keeping track of the overall
inventory of the system and relationships between different parts. There is only one active mangler at any one time in the
system. Currently the active mangler is the mangler on the primary node.

The command line interface (tcli) or tcl-based GUI Administrative Interface connect to the active mangler. All updates and
changes are then propagated from the active mangler to all nodes in the system.

All configuration data is currently stored as the Table of Contents (TOC) on every physical disk in the system.

There Are Three Different Ways to Run CLI Commands

Execute the Commands from the TCL Shell

Execute the Commands from an OS Shell

Execute the Commands from a Script

Page 3
CLI – Scheduler & Virtual Lock Lab

Step 2: Create a Schedule


Preparation Steps include -
Create a CPG - Create a Virtual Volume with a Virtual Lock - Create another VV with a Virtual Lock

Create a CPG
Use an existing CPG or create a new CPG using default options (RAID-10, FC)

cli% createcpg cpg01

Create a Virtual Volume with a Virtual Lock


Create a virtual volume called “testvol01” and set a retention time of 1 hour

cli% createvv –tpvv -retain 1H cpg01 testvol01 1g

Verify the virtual volume retention is set

cli% showvv –hist –retained testvol01

Create another Virtual Volume with a Virtual Lock


Create a virtual volume called “testvol02” and set an expiration time of 1 hour

cli% createvv –exp 1h cpg01 testvol02 1g

Verify the virtual volume retention is set for both volumes

cli% showvv –retained

Try Deleting the Virtual Volume

cli% removevv testvol01

Page 4
CLI – Scheduler & Virtual Lock Lab

Create Schedule to Create Virtual Copies on a Recurring Basis


Create a schedule using the “createsched” command – it takes time arguments like a crontab.

The allowed values for the fields are: minute / hour / day-of-month / month / day-of-week

Create a virtual volume virtual copy named “testvol01.<hour_taken>.<minute_taken>” and retain it


for 1 hour

The “-retain” option specifies the Virtual Lock’s Retention Time

cli% createsched "createsv -ro -retain 1h @vvname@.@H@.@M@


testvol01" "0 * * * *" vc_testvol01_task

The previous command creates a scheduled task that will run every hour on the hour
("0 * * * *") and will create a read-only (-ro) snapshot of VV testvol01, with a retention time of one
hour (-retain 1h). The created snapshot will be named testvol01.HH.MMM where HH
and MM refer to the hour and minute that the snapshot was created (@vvname@.@H@.@M@)

For help with the patterns supported for VV names, type the following help command:
cli% help sub,vvnamepat

The following command creates a scheduled task that will run every hour ("0 * * * *") and will create
a read-write snapshot of VV testvol02, with an expiration time of two hours (-exp 2h). The created
snapshot will be named testvol02.HH.MMM where HH and MM refer to the hour and minute that the
snapshot was created (@vvname@.@H@.@M@)

cli% createsched "createsv -exp 2h @vvname@.@H@.@M@


testvol02" "0 * * * *" vc_testvol02_task

Page 5
CLI – Scheduler & Virtual Lock Lab

Step 3: Create a “One Time Only” Schedule


Create a schedule to run checkhealth once at 15 minutes past the hour and call it chktask1

cli% createsched -run_once checkhealth "15 * * * *" chktask1

Confirm Schedule and View Status


To display the status of the scheduled task you created in Step 2 run the “showsched” command:

cli% showsched

Suspend or Resume a Schedule


cli% setsched –suspend chktask01

cli% setsched –resume chktask01

Change or Modify a Schedule


The command to change or modify an existing schedule is “setsched”

You can change the name of the schedule or turn task failure alert generation off and on

To change the schedule execution times - the “-s” option sets a new schedule for a given task

cli% setsched –s “0 * * * *” chktask01

Page 6
CLI – Scheduler & Virtual Lock Lab

Now change the name of the schedule “chktask01” to be named “healthchecktask01”

cli% setsched –name chktask01 healthchecktask01

Now change the schedule so that it does not generate an alert on failure

cli% setsched –no_alert healthchecktask01

Step 4: View Task Status


cli% showtask

The “-waittask” option is available for all commands that can be scheduled and asks the CLI to wait for
a task to complete before proceeding. The command automatically notifies you when the specified
task is finished.

Cancel or Modify Tasks


The “canceltask” command is used to cancel one or more active tasks by providing the task ID(s) to be
cancelled or by using the “all” specifier which cancels all active tasks.

To delete tasks that have been scheduled and already run, use the “removetask” command. This
command removes information about one or more completed tasks and their details.

Page 7
CLI – Scheduler & Virtual Lock Lab

When canceling any tune command task, (or multiple tasks,) the canceltask command may return
before a cancellation is complete. Thus, resources reserved for the task may not be immediately
available. This will prevent actions like attempting another tune on the same VV.

Scripts should use the “-waittask” command option in order to ensure orderly completion of the
tunetpvv or tune-whatever command cancellation prior to taking other actions. This option, “-
waittask” is available for all of the commands that are schedulable.

Using the “-waittask” option with these commands will create an automatic notification when the
specified task is completed, unless the “-q” option is used and the end state of the task will not be
reported. (quiet mode) You can also use “waittask” as a standalone command when scripting.

Example of using waittask on a task with ID=1:

cli% waittask 1

Step 6: Remove a Schedule


To remove a schedule you first want to confirm it’s name and that it is scheduled to run by typing

cli% showsched

You remove the schedule using the “removesched” command and the name of the Schedule

cli% removesched healthchecktask01

You will be prompted whether or not you really want to remove this schedule you called out by name
Enter “y” to confirm it’s the correct schedule or enter “n” to prevent removal of the Schedule listed

Run the “showsched” command to confirm removal of the Schedule as shown by the example abo ve

Page 8
CLI – Scheduler & Virtual Lock Lab

Step 7: View and Modify Virtual Locks


In this step there are three (3) ways to view the Virtual Lock

View Virtual Volume Virtual Lock Settings


cli% showvv –hist –retained testvol01

Modify Virtual Volume Virtual Lock Settings


The following command changes the retention time for VV “testvol01” to 2 hours

cli% setvv –retain 2H testvol01

The following command changes the expiration time for VV “testvol01” to 3 hours

cli% setvv –exp 3H testvol01

View InServ System Virtual Lock Settings


cli% showsys –param

Modify InServ System Virtual Lock Settings


In the example output above, the VVRetentionTimeMax parameter shows the system Virtual Lock
setting to be 7 days -- 24(hours) * 7(days) = 168 Hours. The following command sets it to 14 days:

cli% setsys VVRetentionTimeMax 336H

Page 9
CLI – Scheduler & Virtual Lock Lab

View Domain Virtual Lock Settings


cli% showdomain –d

Modify Domain Virtual Lock Settings


The “-vvretentiontimemax” option to the “createdomain” and “setdomain” commands provides the
ability to set the Maximum Retention Time for virtual volumes within a domain. The default is 14
days.

To disable the volume retention time in the domain set the maximum retention time to “0”.

To change the maximum retention time for volumes within the domain called “DomainB,” use the
following command:

cli% setdomain –vvretentiontimemax 2H DomainB

Modify Virtual Locks in the GUI


Can you find how to do this? [hint: right-click a virtual volume and choose to edit the properties]

How can you remove a Virtual Volume with a Retention Time?


You can easily delete a Virtual Volume using the correct hidden command if the expiration time is too
long for you to wait for expiration?

YOU CAN NOT REMOVE VVs WITH VIRTUAL LOCKS –


AND NOBODY ELSE CAN, EITHER – NEVER FORGET THIS !
Page 10

You might also like