PRIMECLUSTER Global Disk Services Configuration and Administration Guide 4.1 (Solaris(TM) Operating System) |
Contents |
Chapter 6 Backing Up and Restoring | > 6.6 Backing Up and Restoring through an External Server | > 6.6.2 Backing Up and Restoring through Snapshot by Slice Detachment |
2) Detaching the backup target slice
Temporarily detach the slice on Disk1 that is the backup target, among slices in application volume Volume1. The following procedure must be performed on Node1 or Node2 in the primary domain.
The following example secures data consistency by stopping the services when a slice is detached. Steps 2-1) and 2-3) are not required if your software, such as a file system and a database system, that manages volume data provides functionality ensuring data consistency or repairing consistency for a detached slice. Alternatively, data consistency must be secured with the method specific to that software. For details, see "Ensuring Consistency of Snapshot Data."
2-1) Stopping the services
To secure consistency of data in a detached slice, exit all applications accessing application volume Volume1 on Node1 and Node2.
When Volume1 is used as a file system, it should be unmounted.
2-2) Detaching the slice
Temporarily detach the slice on disk Disk1 from Volume1. To write-lock the detached slice, set the access mode of the slice to ro (read only).
# sdxslice -M -c Class1 -d Disk1 -v Volume1 -a jrm=off,mode=ro |
Just Resynchronization Mode for Silice
On backup server Node3, data may be written from Node3 into Disk1 when data in Disk1 is backed up to tape. GDS in the primary domain cannot recognize the write occurrence from Node3. Consequently, if the JRM mode of the detached slice is "on", the portions updated from Node3 may not be involved in resynchronization copying performed when the slice is reattached. If this happens, synchronization of Volume1 is no longer ensured. For this reason, the JRM mode of a detached slice must be set to off in advance.
2-3) Resuming the services
When the file system was unmounted in step 2-1), mount it again.
Resume the application stopped in step 2-1).
3) Viewing the configuration of the application volume
On Node1 or Node2 in the primary domain, view the configuration of application volume Volume1 that is the backup target.
# sdxinfo -c Class1 OBJ NAME TYPE SCOPE SPARE ------ ------- -------- ----------- ----- class Class1 shared Node1:Node2 0 OBJ NAME TYPE CLASS GROUP DEVNAM DEVBLKS DEVCONNECT STATUS ------ ------- ------ ------- ------- ------- -------- ---------------- ------- disk Disk1 mirror Class1 Group1 c1t1d1 8380800 Node1:Node2 ENABLE disk Disk2 mirror Class1 Group1 c2t1d1 8380800 Node1:Node2 ENABLE OBJ NAME CLASS DISKS BLKS FREEBLKS SPARE ------ ------- ------- ------------------- -------- -------- ----- group Group1 Class1 Disk1:Disk2 8290304 7176192 0 OBJ NAME CLASS GROUP SKIP JRM 1STBLK LASTBLK BLOCKS STATUS ------ ------- ------- ------- ---- --- -------- -------- -------- -------- volume * Class1 Group1 * * 0 65535 65536 PRIVATE volume Volume1 Class1 Group1 off on 65536 1114111 1048576 ACTIVE volume * Class1 Group1 * * 1114112 8290303 7176192 FREE OBJ CLASS GROUP DISK VOLUME STATUS ------ ------- ------- ------- ------- -------- slice Class1 Group1 Disk1 Volume1 TEMP slice Class1 Group1 Disk2 Volume1 ACTIVE |
4) Creating a shadow volume for backup
Create a volume for backup (shadow volume) to disk c1t1d1 on backup server Node3. The following settings are necessary on backup server Node3.
Application volume data may be damaged if data is written into a shadow volume in incorrect configuration. Be sure to confirm that the shadow volume configuration is correct in step 4-4).
4-1) Registering a shadow disk
Register disk c1t1d1 with shadow class Class2, and name it Disk1.
# sdxshadowdisk -M -c Class2 -d c1t1d1=Disk1 |
The disk name must correspond to the disk name assigned to disk c1t1d1 in step 1-1). The disk names assigned in 1-1) can be viewed in the NAME field for disk information displayed with the sdxinfo command in step 3).
The class can be assigned any name.
4-2) Creating a shadow group
Connect shadow disk Disk1 to mirror type shadow group Group1.
# sdxshadowdisk -C -c Class2 -g Group1 -d Disk1 |
4-3) Creating a shadow volume
Create shadow volume Volume1 to shadow group Group1.
# sdxshadowvolume -M -c Class2 -g Group1 -v Volume1 -s 1048576 |
The volume must be created in the size corresponding to the volume size in step 1-3). The size of a volume created in step 1-3) can be viewed in the BLOCKS field for volume information displayed with the sdxinfo command in step 3).
If there are multiple volumes, the corresponding shadow volumes must be created in the order of ascending values (first block numbers) in the 1STBLK field for volume information displayed with the sdxinfo command in step 3).
The volume can be assigned any name.
4-4) Viewing the configuration of the shadow volume
Using the sdxinfo command, confirm that the group configuration and the volume configuration are correct based on group information in the DISKS field, volume information in the 1STBLK field and in the BLOCKS field and so on.
# sdxinfo -c Class2 OBJ NAME TYPE SCOPE SPARE ------ ------- -------- ----------- ----- class Class2 local Node3 0 OBJ NAME TYPE CLASS GROUP DEVNAM DEVBLKS DEVCONNECT STATUS ------ ------- ------ ------- ------- ------- -------- ---------------- ------- disk Disk1 mirror Class2 Group1 c1t1d1 8380800 Node3 ENABLE OBJ NAME CLASS DISKS BLKS FREEBLKS SPARE ------ ------- ------- ------------------- -------- -------- ----- group Group1 Class2 Disk1 8290304 7176192 0 OBJ NAME CLASS GROUP SKIP JRM 1STBLK LASTBLK BLOCKS STATUS ------ ------- ------- ------- ---- --- -------- -------- -------- -------- volume * Class2 Group1 * * 0 65535 65536 PRIVATE volume Volume1 Class2 Group1 off off 65536 1114111 1048576 ACTIVE volume * Class2 Group1 * * 1114112 8290303 7176192 FREE OBJ CLASS GROUP DISK VOLUME STATUS ------ ------- ------- ------- ------- -------- slice Class2 Group1 Disk1 Volume1 ACTIVE |
5) Backing up to tape
On backup server Node3, back up data in the shadow volume to tape. The following shows examples of backing up data in shadow volume Volume1 to a tape medium of tape device /dev/rmt/0.
For details on the backup method, see the manuals of file systems to be backed up and used command.
In a GFS Shared File System
Back up through the method as described in step 5a).
5a) When backing up data held in a raw device with the dd(1M) command
# dd if=/dev/sfdsk/Class2/rdsk/Volume1 of=/dev/rmt/0 bs=32768 |
5b) When backing up a ufs file system with the tar(1) command
5b-1) Activate shadow volume Volume1 in the read and write access mode (rw).
# sdxshadowvolume -F -c Class2 -v Volume1 |
5b-2) Check and repair consistency of the ufs file system on shadow volume Volume1. If the file system was unmounted when the slice was detached in step 2), this step can be skipped.
# fsck -F ufs -y /dev/sfdsk/Class2/rdsk/Volume1 |
5b-3) Mount the ufs file system on shadow volume Volume1 on /mnt1, a temporary mount point, in the read only mode.
# mkdir /mnt1 |
5b-4) Back up data held in the file system to tape.
# cd /mnt1 |
5b-5) Unmount the file system mounted in step 5b-3).
# cd / |
5c) When backing up a ufs file system with the ufsdump(1M) command
5c-1) Activate shadow volume Volume1 in the read and write access mode (rw).
# sdxshadowvolume -F -c Class2 -v Volume1 |
5c-2) Check and repair consistency of the ufs file system on shadow volume Volume1. If the file system was unmounted when the slice was detached in step 2), this step can be skipped.
# fsck -F ufs -y /dev/sfdsk/Class2/rdsk/Volume1 |
5c-3) Back up data held in the file system to tape.
# ufsdump 0ucf /dev/rmt/0 /dev/sfdsk/Class2/rdsk/Volume1 |
5d) When backing up the sfxfs file system(GFS Local File System or SynfinityFile file system) with the tar(1) command
5d-1) Activate shadow volume Volume1 in the read and write access mode (rw).
# sdxshadowvolume -F -c Class2 -v Volume1 |
5d-2) Reconfigure the partition information of the sfxfs file system on shadow volume Volume1.
# sfxadm /dev/sfdsk/Class2/rdsk/Volume1 |
5d-3) Check and repair consistency of the sfxfs file system on shadow volume Volume1. If the file system was unmounted when the slice was detached in step 2), this step can be skipped.
# fsck -F sfxfs -y /dev/sfdsk/Class2/rdsk/Volume1 |
5d-4) Mount the sfxfs file system on shadow volume Volume1 on /mnt1, a temporary mount point, in the read only mode.
# mkdir /mnt1 |
5d-5) Back up data held in the file system to tape.
# cd /mnt1 |
5d-6) Unmount the file system mounted in step 5d-4).
# cd / |
5e) When backing up the sfxfs file system(GFS Local File System or SynfinityFile file system) with the sfxdump(1M) command
5e-1) Activate shadow volume Volume1 in the read and write access mode (rw).
# sdxshadowvolume -F -c Class2 -v Volume1 |
5e-2) Reconfigure the partition information of the sfxfs file system on shadow volume Volume1.
# sfxadm /dev/sfdsk/Class2/rdsk/Volume1 |
5e-3) Check and repair consistency of the sfxfs file system on shadow volume Volume1. If the file system was unmounted when the slice was detached in step 2), this step can be skipped.
# fsck -F sfxfs -y /dev/sfdsk/Class2/rdsk/Volume1 |
5e-4) Back up data held in the file system to tape.
# sfxdump 0ucf /dev/rmt/0 /dev/sfdsk/Class2/rdsk/Volume1 |
6) Removing the shadow volume
After the backup process is complete, remove the shadow volume to prevent improper access to it. The following procedure must be performed on backup server Node3.
6-1) Stopping the shadow volume
Stop shadow volume Volume1.
# sdxshadowvolume -F -c Class2 -v Volume1 |
6-2) Removing the shadow volume
Remove shadow volume Volume1.
# sdxshadowvolume -R -c Class2 -v Volume1 |
6-3) Removing the shadow group
Remove shadow group Group1.
# sdxshadowgroup -R -c Class2 -g Group1 |
6-4) Removing the shadow disk
Remove shadow disk Disk1.
# sdxshadowdisk -R -c Class2 -d Disk1 |
7) Reattaching the backup target slice
Reattach the slice temporarily detached from the application volume back to it. The following procedure must be performed on Node1 or Node2 in the primary domain.
7-1) Reattaching the backup target slice
Reattach slice Volume1.Disk1 temporarily detached from application volume Volume1 in step 2-2).
# sdxslice -R -c Class1 -d Disk1 -v Volume1 |
After returning from the command, synchronization copying from the slice on Disk1 of volume Volume1 to the slice on Disk2 is executed.
7-2) Viewing the copy status
The status of synchronization copying can be viewed using the sdxinfo -S command. The copy destination slice is in the COPY status if copying is in progress and it will be in the ACTIVE status after the copy process ends normally (note, however, that it will be in the STOP status when Volume1 is in the STOP status).
# sdxinfo -S -c Class1 -o Volume1 OBJ CLASS GROUP DISK VOLUME STATUS ------ ------- ------- ------- ------- -------- slice Class1 Group1 Disk1 Volume1 ACTIVE slice Class1 Group1 Disk2 Volume1 COPY |
Contents |