Discussion:
[hercules-390] How to take a consistent snapshot of a running Z/OS on Hercules
matteo_ferrari@yahoo.com [hercules-390]
2018-07-11 20:21:02 UTC
Permalink
Hi all,
I am looking a way to 'freeze' all I/O on disk in order to take a consistent snapshot of the whole Z/OS, so that, if I need I can restore it at any time.
Best would be to do it through an Hercules command...
Any idea on how to accomplish it? Tried suspend but it shutdown eveything and resume did not work....


Txh a lot
Matteo
peter_j_jansen@yahoo.com [hercules-390]
2018-07-11 20:52:26 UTC
Permalink
I use the Hercules' DASD shadow feature for that. Works super.

Cheers,


Peter J.
matteo_ferrari@yahoo.com [hercules-390]
2018-07-12 06:38:45 UTC
Permalink
Thanks Peter, I was arriving to the same conclusion, but not clear how to use it. I understand I need to change my config and add an sf= template for each volume, but not sure how to use it for my goal.
I would like to:
-take a synchronized snapshot of all the volumes without stopping emulator
- be able to go back to a specific snapshot, possibily without stopping the emulator


Would it be possible? If so, how would you orchestrate it?
Thx a lot
Matteo
Ivan Warren ivan@vmfacility.fr [hercules-390]
2018-07-12 07:02:24 UTC
Permalink
Post by ***@yahoo.com [hercules-390]
Thanks Peter, I was arriving to the same conclusion, but not clear how
to use it.
I understand I need to change my config and add an sf= template for
each volume, but not sure how to use it for my goal.
-take a synchronized snapshot of all the volumes without stopping emulator
- be able to go back to a specific snapshot, possibily without
stopping the emulator
Would it be possible? If so, how would you orchestrate it?
Thx a lot
Matteo
The idea is as follows :

- have shadow files configured.... sf= in the DASD statement.

before doing your backup :
- stopall (This will freeze hercules for a very short time)
- sf+* (this is a VERY quick operation since it only involves creating
stub files and turning the base files read only)
- startall (hercules resumes execution)

** Backup the base disks - they will no longer be touched and indicate a
consistent image at the time of the 'stopall' since all modifications
are now going to the shadow files.

After backup is done :
sf-* (no need to stop anything at this point.. The shadow files will be
commited back to the base files on the fly and deleted when the
operation is done) - this MAY take some time depending on the size of
the DASDs and the amount of activity that occured during the backup
phase. so maybe expect a slight performance degradation on the I/O side
for a little while.)
sfc* (optional - performs garbage colllection and recompression if
necessary).

****

If you restore the DASDs, and re-ipl your system from there it will
appear as if a complete power failure had occured (with the necessary
EPO) at the time of the "stopall" command.

****

This works for ANY operating system running under hercules... Not only MVS !

****

You may also chose to do a primary backup of the base files... and then
to only backup shadow files.. base and shadow files are hierarchical..
so if can do step 1 for the initial backup (and not the sf-*)... then do
step 1 again for subsequent backups and only backup the level 1 shadow
files afterwards... And if you're crazy enough, use git for versioning
and now you have an incremental forever backup system !

--Ivan


[Non-text portions of this message have been removed]
matteo_ferrari@yahoo.com [hercules-390]
2018-07-12 07:29:53 UTC
Permalink
Ivan, thanks for the complete and clear explanation!! so, in case of restore to a specific point in time , I will restore the base volumes and remove manually the shadow files that have been created, the IPL, right?
also, sorry for the stupid question, what do you mean by EPO?


thx a lot
Matteo
matteo_ferrari@yahoo.com [hercules-390]
2018-07-12 07:50:30 UTC
Permalink
Ivn, thanks a lot! I should have imagined the acronym for EPO... :-) Have a nice day
Matteo
Tony Harminc tharminc@gmail.com [hercules-390]
2018-07-12 22:31:41 UTC
Permalink
On 12 July 2018 at 03:02, Ivan Warren ***@vmfacility.fr wrote:
[...]
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
If you restore the DASDs, and re-ipl your system from there it will
appear as if a complete power failure had occured (with the necessary
EPO) at the time of the "stopall" command.
****
This works for ANY operating system running under hercules... Not only MVS !
It should be kept in mind, though, that none of this guaranties a
consistent state for the guest OS. If you hit that EPO switch, nothing
takes care of the situation where an application program (or JES2 or
IMS or whatever) has read some records representing something (a bank
account?), updated some of the values in storage, and has written out
some but not all of them.

Of course these various programs have ways of dealing with this
situation (journalling, roll-back or -forward, etc.), but you have to
invoke that mechanism independent of anything you do at the Hercules
level.

Tony H.
Ivan Warren ivan@vmfacility.fr [hercules-390]
2018-07-12 23:15:22 UTC
Permalink
Post by Tony Harminc ***@gmail.com [hercules-390]
[...]
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
If you restore the DASDs, and re-ipl your system from there it will
appear as if a complete power failure had occured (with the necessary
EPO) at the time of the "stopall" command.
****
This works for ANY operating system running under hercules... Not only MVS !
It should be kept in mind, though, that none of this guaranties a
consistent state for the guest OS. If you hit that EPO switch, nothing
takes care of the situation where an application program (or JES2 or
IMS or whatever) has read some records representing something (a bank
account?), updated some of the values in storage, and has written out
some but not all of them.
Of course these various programs have ways of dealing with this
situation (journalling, roll-back or -forward, etc.), but you have to
invoke that mechanism independent of anything you do at the Hercules
level.
Tony H.
Tony,

Exactly.. We're talking about a sudden power off... Nothing more !

--Ivan



[Non-text portions of this message have been removed]
Mike Schwab Mike.A.Schwab@gmail.com [hercules-390]
2018-07-13 00:22:02 UTC
Permalink
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Post by Tony Harminc ***@gmail.com [hercules-390]
[...]
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
If you restore the DASDs, and re-ipl your system from there it will
appear as if a complete power failure had occured (with the necessary
EPO) at the time of the "stopall" command.
****
This works for ANY operating system running under hercules... Not only MVS !
It should be kept in mind, though, that none of this guaranties a
consistent state for the guest OS. If you hit that EPO switch, nothing
takes care of the situation where an application program (or JES2 or
IMS or whatever) has read some records representing something (a bank
account?), updated some of the values in storage, and has written out
some but not all of them.
Of course these various programs have ways of dealing with this
situation (journalling, roll-back or -forward, etc.), but you have to
invoke that mechanism independent of anything you do at the Hercules
level.
Tony H.
Tony,
Exactly.. We're talking about a sudden power off... Nothing more !
--Ivan
------------------------------------
------------------------------------
You can also drain initiators to stop batch jobs from starting and
issue commands to transaction processing regions to hold processing
before doing your shadow file commands for a cleaner restore.
--
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all?
'Dave Wade' dave.g4ugm@gmail.com [hercules-390]
2018-07-13 07:27:23 UTC
Permalink
-----Original Message-----
Sent: 13 July 2018 01:22
Subject: Re: [hercules-390] Re: How to take a consistent snapshot of a
running Z/OS on Hercules
You can use SF+ to create new shadow files but that does not save the state of the running OS.
Perhaps there could be a useful addition to Hercules that saved the machine status and started new shadow files for new DASD but you would still not have tape position info, unit record position info....

If you really want to "snapshot" Hercules, I would say the simplest way is to run it in a Hypervisor and get the Hypervisor to snapshot the whole OS....
... not sure how that works for externally connected 3270 sessions, RSCS, ......
http://groups.yahoo.com/group/hercules-390
http://www.hercules-390.org
I presume Jay is the only person who can change the above?

Dave

Loading...