Storage Software
1748058 Members
5321 Online
108758 Solutions
New Discussion юеВ

Request SSSU scripting assistance

 
SOLVED
Go to solution
Tim Chilton
Frequent Advisor

Request SSSU scripting assistance

Hello all! I have a number of LUNs configured in a mirror set that is fractured most of the day. The main LUN is presented to server1 and the mirror is presented to server2. These LUNs are manipulated by an automated process. Each day, the mirror LUN is removed from server2 and is resynched with the LUN that is presented to server1. The automation waits for a period of time, then fractures the mirror and re-presents the mirrored LUN to server2. We're getting ready to add some more disks to this process and, since the SSSU documentation doesn't go very deep, I thought that I'd present them to the forum. The scripts are attached.

Since there are 49 LUNs currently affected by this process, does SSSU execute each line of the script, wait for completion, then move to the next line? For example, if I have 49 "delete LUN xxxxx" commands, does it pause 49 times waiting for the LUN to be removed from the host, or does it start the process, then move to the next delete statement?

The reason I ask is that this process was created by my predecessor, who is no longer with the company. I'm getting ready to add 6 more LUNs to the 49 currently affected and want to make sure that I have ample time for the mirror to synch up properly. I'm thinking that if the script waits for each line to complete, I should add 10% to the time window.

As I said, the scripts are attached. PSTEP1 is the script that removes the LUN from server2 and re-synchs the LUN. PSTEP2 breaks the mirror and gives the LUN back to server2.

 

P.S. This thread has been moved from Storage Area Networks (SAN) (Enterprise) to HP Storage System Scripting Utility (SSSU). -HP Forum Moderator

3 REPLIES 3
susanta_dutta
Trusted Contributor

Re: Request SSSU scripting assistance

Hello Tim,


The DELETE LUN command removes access to a virtual disk from a host, it does not process anything on the Array, just removes an entry from configuration table, hence this command does not have the option "wait_for_completion".

One option called "command_delay" of SET OPTIONS command is for the number of seconds (0├в 300) to wait between issuing commands when running a script from a FILE command. The default is 10 seconds. This option
has no effect when maually entering commands at the command line.

Currently, looks like, you are using 2 second delay

SET OPTIONS ON_ERROR=exit_ON_ERROR command_delay=2
SET OPTIONS ON_ERROR=continue

But, not sure, why you set to CONTINUE just after setting of EXIT_ON_ERROR for ON_ERROR option.

I guess, you need something like:

SET OPTIONS COMMAND_DELAY=
SET OPTIONS ON_ERROR=CONTINUE

Regards
Susanta
McCready
Valued Contributor
Solution

Re: Request SSSU scripting assistance

For some reason (maybe my firewall) was not able to download your script...so if you are already doing the below, I apologize.

As a general rule (and being bitten a few times with commands not "finishing" on the array before the next one started, like creating a vdisk then failing upon a presentation attempt via SSSU) I would after issuing a command verify the command completed, such as
- Create the vdisk
- ls the vdisk
- then present the vdisk to first host
- ls that lun
- present the vdisk to a second host (in cluster, etc.)
This avoids the need for set time between commands, but rather allows SSSU/ the array to "pace" itself. Some folks have told me this is needlessly conservative, but I would rather be safe than sorry, especially if this is running when someone is not online to do a fix if needed.

However, your resynch process is a bit more troubling, as it seems to wait "for a period of time" rather than checking to see if the mirrorclone is actually resynched (which you can do by parsing an LS of the vdisk, searching for the desired state of the mirrorclone in the output) to be safe. That method will require stepping out of SSSU to some O/S utility, but that is what I would rather do to be safe. The RSM utility/product you get with command view *may* be able to do that as part of it's scripting language, but our experience with running multiple jobs in it has been so poor (don't get me started)we only use SSSU now.

check out evamgt.wetpaint.com and evamgt google group
Tim Chilton
Frequent Advisor

Re: Request SSSU scripting assistance

Thanks!