Hi James!

In order to get a snapshot, you first need to make sure that Linux is not
going to change your source volume while copying. If you are using ESS
(Shark) dasd, you can use the flashcopy feature along with a journaling
filesystem (ext3/reiser) without the need to do so. The flashcopy service
is much more comfortable (and less error-prune) like the method described
here:
In case you prefer using Linux' tools, you need to remount _all_
filesystems on dasds that are being copied to read-only mode like this:
mount -t <FSTYPE> -o remount,ro <DASD PARTITION> <MOUNT POINT>
You can verify that this worked by looking at /proc/mounts. The filesystems
on the source dasds should have the "ro" attibute.
The next step is prepare a dasd as target. You need to have the _exact_
same size of a dasd volume than with the source volume (i.e. both same
device type&model, same amount of cylinders).
Both source and target volume need to be formatted at the same disk layout
and the same blocksize. For determining the layout&blocksize of the source
volumes, look at your dmesg for a message like:
dasd(eckd): /dev/dasdb  ( 94:  4),[EMAIL PROTECTED]: (4kB blks): 2404080kB at
48kB/trk compatible disk layout
Use dasdfmt to create the same layout/blocksize on the target volume.
Now that you mounted all FS on the source read-only and created a target
volume with the same block layout, you can copy the volumes with dd. The
following example command would copy dasda (including all partitions on it)
to dasdb with 4096 bytes blocksize:
dd if=/dev/dasda of=/dev/dasdb bs=4096
After copying the volumes and before entering multiuser mode again, you
need to remount the filesystems read+write again with commands like:
mount -t <FSTYPE> -o remount,rw <DASD PARTITION> <MOUNT POINT>
I recommend to mount the copy afterwards and change the kernel parameter
(dasd=<new device numbers instead of devnos of the source>) and rerun zipl
for the copy in order to make the copy runnable.
In case you encounter problems, please CC: me directly in your response
because I do not read this list frequently...!

mit freundlichem Gru� / with kind regards
Carsten Otte
--
IBM Deutschland Entwicklung GmbH
Linux kernel coder
Phone: +49 7031 16 4076
Tie Line: (*120) 4076


                                                                                       
                                                 
                      James Melin                                                      
                                                 
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                                           
                      epin.mn.us>               cc:                                    
                                                 
                      Sent by: Linux on         Subject:  Device to device copy within 
a running linux                                  
                      390 Port                                                         
                                                 
                      <[EMAIL PROTECTED]                                               
                                                 
                      ST.EDU>                                                          
                                                 
                                                                                       
                                                 
                                                                                       
                                                 
                      06/17/03 09:40 PM                                                
                                                 
                      Please respond to                                                
                                                 
                      Linux on 390 Port                                                
                                                 
                                                                                       
                                                 
                                                                                       
                                                 



I would like to be able to do some volume snapshots for a disaster recovery
exercise.

Since we don't have VM, what I'd like to do is go down to single user mode,
software applications stopped and issue a device copy for all active
devices, and then come back up with the devices I just copied to, mounted
at /mnt.

This will let me change the internal configuration files to that of the
hardware devices for the disaster recovery system, or in my case for
testing my DR testing plan, another LPAR, and IPL the copies


What is the best method to do this? I know I could disk copy the volumes
using DFSMShsm with linux down, but I'd rather not come all the way down.
I've got the dasd to spare for this, so I'd like to try it.


So best way to shutdown to single user mode, kick off a script, and what
commands to dump the dasd in that script,  and return to runlevel 3 is the
what I'm after


Reply via email to