3PAR Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Status of executed tasks
PostPosted: Mon Sep 16, 2019 12:47 am 

Joined: Mon Sep 16, 2019 12:26 am
Posts: 2
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Status of executed tasks
PostPosted: Tue Sep 17, 2019 12:25 am 

Joined: Wed May 07, 2014 1:51 am
Posts: 251
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.

_________________
When all else fails, read the instructions.


Top
 Profile  
Reply with quote  
 Post subject: Re: Status of executed tasks
PostPosted: Tue Sep 17, 2019 1:27 am 

Joined: Mon Sep 16, 2019 12:26 am
Posts: 2
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt