This subsection describes the procedures for backing up volumes through the use of OPC snapshot of GDS Snapshot.
Procedure
1) Relating a proxy volume
Before creating snapshots, relate proxy volume Volume2 as a copy destination to master volume Volume1. In this example, Volume1 and Volume2 belong to class Class1. Execute the following command on a node that belongs to the scope of Class1.
# sdxproxy Relate -c Class1 -m Volume1 -p Volume2 |
2) Stopping the proxy volume
Stop proxy volume Volume2. If Class1 is a shared class, specify the "-e allnodes" option to stop Volume2 on all nodes.
# sdxvolume -F -c Class1 -v Volume2 |
3) Stopping the services
To secure consistency of snapshot data, stop the services before creating a snapshot and restrain the master volume from being written in.
3a) When the master volume is being used for a cluster application
Inactivate the cluster application.
3b) When the master volume is not being used for a cluster application
3b-1) Stop the services for which the master volume is being used.
3b-2) When the master volume is being used as a file system, unmount the file system. This example shows the procedure when the mount point is /DATA.
# cd / # umount /DATA |
4) Updating the proxy volume
Copy data from master volume Volume1 to proxy volume Volume2 with the OPC function to update Volume2 with the data of Volume1 at the moment. Execute the following command on a node that belongs to the scope of class Class1.
For using OPC function
# sdxproxy Update -c Class1 -p Volume2 -e instant |
Note
When a QuickOPC session exists
When a QuickOPC session exists between master volume and proxy volume, the above command can copy only the differences between master and proxy. If you want to copy the whole master volume, stop the QuickOPC session. Then, speficy -e OPC option and execute the sdxproxy Update command.
# sdxproxy Cancel -c Class1 -p Volume2 |
For using QuickOPC function
# sdxproxy Update -c Class1 -p Volume2 -e instant,QOPC |
When returning from the command, the update of Volume2 will be complete. Subsequently, background OPC physical copying is performed, but you may go on to step 5) without waiting until the copying is complete.
5) Resuming the services
5a) When the master volume is used for a cluster application
Activate the cluster application.
5b) When the master volume is not used for a cluster application
5b-1) When the master volume is used as a file system, mount the file system. This example shows the procedure when the ext4 file system on master volume Volume1 is mounted on mount point /DATA.
# mount -t ext4 /dev/sfdsk/Class1/dsk/Volume1 /DATA |
5b-2) Start the services for which the master volume is used.
6) Starting the proxy volume
Start proxy volume Volume2 on a node where backup to tape is performed.
# sdxvolume -N -c Class1 -v Volume2 |
7) Confirming the completion of copying
Confirm that the copying is complete.
# sdxinfo -S -c Class1 -o Volume2
OBJ CLASS GROUP DISK VOLUME STATUS
----- ------ ------ ------ ------- -------
slice Class1 Group2 Disk3 Volume2 ACTIVE
slice Class1 Group2 Disk4 Volume2 ACTIVE |
If all the displayed slices' STATUS fields are "ACTIVE", copying is complete. If the copying is still in progress, "COPY" will be displayed in the STATUS field.
8) Backing up to tape
Back up the snapshot data on the proxy volume to tape. Execute the following commands on a node that belongs to the scope of class Class1.
See
For details on the backup methods, see the manuals of file systems to be backed up and used commands.
8a) When backing up data with the dd(1) command
# dd if=/dev/sfdsk/Class1/dsk/Volume2 of=/dev/st0 bs=32768 |
8b) When backing up the ext4 file system with the tar(1) command
8b-1) Before mounting
Check and repair consistency of the ext4 file system on the proxy volume with the fsck(8) command. When the file system on the master volume was unmounted in step 3b-2), skip this step.
# fsck -t ext4 /dev/sfdsk/Class1/dsk/Volume2 |
8b-2) Mounting the snapshot
Mount the ext4 file system on proxy volume Volume2 on temporary mount point /DATA_backup.
# mkdir /DATA_backup # mount -t ext4 /dev/sfdsk/Class1/dsk/Volume2 /DATA_backup |
8b-3) Backing up to tape
This example shows the procedure when data is backed up to a tape medium of tape device /dev/st0 with the tar(1) command.
# cd /DATA_backup # tar cvf /dev/st0 . |
8b-4) Unmounting the snapshot
Unmount the file system mounted in step 8b-2).
# cd / |
9) Stopping the proxy volume
After backing up to tape, stop Volume2 to protect data in proxy volume Volume2. If Class1 is a shared class, specify the "-e allnodes" option to stop Volume2 on all the nodes.
# sdxvolume -F -c Class1 -v Volume2 |
10) Re-executing online backup
Re-execute step 3) through 9) for performing online backup again.
11) Breaking the proxy volume
When no more online backup is to be executed, cancel the relationship between master volume Volume1 and proxy volume Volume2.
# sdxproxy Break -c Class1 -p Volume2 |