HPE Storage Users Group
https://3parug.com/

Status of executed tasks
https://3parug.com/viewtopic.php?f=17&t=3280
Page 1 of 1

Author:  ViktorH [ Mon Sep 16, 2019 12:47 am ]
Post subject:  Status of executed tasks

Hey Guys,

Please treat me gentle, I am a noob on the 3PAR scripting side, but hopefully learning quickly :-)

Okay, here is my situation. I need to create/refresh a clone everynight, execute by our production scheduler. Hence the time could occur anytime during the morning.

This has currently been working for 5-6 years on IBM XIV LUNs, and I need to migrate to 3PAR.

I have a HP-UX server with VG created off the batch disk LUN and seperate VG off clone LUN.

So, my processes pretty simple:

- Stop oracle
- unmount both filesystem
- deactivate both VGs
- Call a CLI to refresh snapshot (or clone in 3PAR world)
- active both VGs
- Clean snapshot/clone disk with fsck
- mount filesystems
- Start oracle

Simple? Right?

The problem is that the 3PAR commands only schedules the task and does not wait for completion.

#
# Valid Clone
#
devserver: /3PAR # ssh 3par_devserver@ho3par-01 createvvcopy -r Batch_Snapshot_Online_1
Resync was started. child = Batch_Snapshot_Online_1, task ID = 6084
devserver: /3PAR # echo $?
0
# is the status [0] of the command returned?

What is the best way to check for the schedule job completion?

Do I simply loop around :

while ( not completed )
{
devserver: /3PAR # ssh 3par_devserver@3par-01 showtask -d 6084

}

The solution needs to be self contained on the HP-UX box.

Cheers

Viktor

Author:  apol [ Tue Sep 17, 2019 12:25 am ]
Post subject:  Re: Status of executed tasks

Hi, did you check if this cli command supports the -waittask or -wait parameter? Or you can check with showtask -d <taskid> (in your example: 6084) which state your task currently has.

But -waittask acts strange in some comamnds, if just creating a task it completes instantly and the option -waittask is without any use four you.

Author:  ViktorH [ Tue Sep 17, 2019 1:27 am ]
Post subject:  Re: Status of executed tasks

doh,

When back to the CLI manual looking for the -waitask option, and somehow i missed this option in the CLI Reference.

-b

Specifies that this command blocks until the operation is completed. If not specified, the createvvcopy command operation is started as a background task.


Cheers

Viktor

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/