This post is more than 5 years old
32 Posts
0
4242
Timefinder VP Snap - Adding new source/target devices
We have some scripts set up that perform the creation, activation and termination of some VP Snap sessions. These run at 6hr intervals and are controlled by crontab on a remote server. Once the session is active it stays active for 2 days. Then after 2 days the next scheduled job will run and it will terminate the current session and re-create a new one.
The problem i have is we have some existing device files and need to append on to it some new source/target pairs into them but if i do that the scripted termination fails and then of course the re-creation of a new session fails because the termination has not killed the old session.
So for example we currently have this device file;
[emcscr@ukbbpssspxy01 device_files]$ cat DF_BACKUP_23
#Src Tgt
01C39 0200D
01C07 02003
01C08 02004
01C05 02005
01C06 02006
01C76 0205F
01C7E 02067
01C66 0202F
01537 02017
And you can see there is an active session running for it;
[emcscr@ukbbpssspxy01 scripts]$ symclone -sid xxxx -f /appl/emc/device_files/DF_BACKUP_23 query
Device File Name : /appl/emc/device_files/DF_BACKUP_23
Device's Symmetrix ID : xxxxxxxxxxxxxx
Source Device Target Device State Cpy
--------------------------------- ---------------------------- ------------ ---
Sym Protected Modified Sym Modified
Logical Dev Tracks Tracks Logical Dev Tracks CGDP SRC <=> TGT (%)
--------------------------------- ---------------------------- ------------ ---
N/A 01C39 245675 0 N/A 0200D 0 V... CopyOnWrite 0
N/A 01C07 47343 0 N/A 02003 0 V... CopyOnWrite 42
N/A 01C08 47816 0 N/A 02004 0 V... CopyOnWrite 41
N/A 01C05 47356 0 N/A 02005 0 V... CopyOnWrite 42
N/A 01C06 47828 0 N/A 02006 0 V... CopyOnWrite 41
N/A 01C76 24462184 0 N/A 0205F 0 V... CopyOnWrite 0
N/A 01C7E 24532492 0 N/A 02067 0 V... CopyOnWrite 0
N/A 01C66 16291904 0 N/A 0202F 0 V... CopyOnWrite 0
N/A 01537 8138633 0 N/A 02017 0 V... CopyOnWrite 0
Total --------- -------- --------
Track(s) 73861232 0 0
MB(s) 4616327 0 0
And what i need to do is add a new device pair into the device file so it is included the next time this session is created. I know i can add the pair detail into the device file but the existing session will not terminate if i do that because the device file contains a pair that is not in an active session.
So does anyone have any ideas on how i can add this pair and let the scripted termination and then creation scripts still control everything? Or is it simply a case of i have to manually terminate the existing sessions, edit the device files and then manually restart the session or leave it to the scripts to start it when its next scheduled?
Any assistance, thoughts and ideas would be appreciated
dynamox
2 Intern
2 Intern
•
20.4K Posts
0
October 13th, 2016 13:00
Andrew,
this temp file would only contain your new devices, not your prod devices. Once relationship was built and in the same state as your prod devices, you would simply delete this temp file and add those devices into your production file.
dynamox
2 Intern
2 Intern
•
20.4K Posts
1
October 10th, 2016 07:00
Andrew,
maybe i don't clearly understand your requirement but what's stopping you from creating a temp file with new devices, create the relationship and so the state of that relationship is the same as your "prod" devices. Now simply append the new devices to your DF_BACKUP_23 file.
AndrewP27
32 Posts
0
October 12th, 2016 23:00
Hi Dynamox,
I tried something similar to what you suggested but i could not figure out how we would get rid of this temporary session. If i terminated that session manually i noticed the device pairing also disappeared from the "prod" session as well and that would cause the "prod" session not to terminate when the script ran at its scheduled time because the device file contained a source/target that was not part of a clone session.
We've sorted it now anyway but introducing a quick IF statement into the scripts that controls all the creation, activation and termination of the session. It checks in a different folder for a new version of the device file and if it exists moves the original one out and replaces it. May not be the best solution but seems to work.
AndrewP27
32 Posts
0
October 13th, 2016 23:00
Hi,
Ah i see what you mean. I was thinking that the temporary device file would have had to stay in place. I did a few tests but never thought to just delete the temporary file and leave it at that.
Oh well never mind they have written this IF statement into the scripts and seems to be working.
Thanks for the clarification anyway.