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.4 Backing Up and Restoring by the Disk Unit's Copy Function |
16) Stopping the services
Exit all applications using application volume Volume1 on Node1 and Node2 in the primary domain.
When Volume1 is used as a file system, unmount it.
17) Stopping the services application
To write-lock volume Volume1, inactivate Volume1 on Node1 and Node2 in the primary domain. Execute the following command on Node1 or Node2.
# sdxvolume -F -c Class1 -v Volume1 -e allnodes |
18) Detaching any nonrelevant slice from the application volume
Temporarily detach the slice on any disk (Disk2) other than Disk1 that is the restore target from Volume1, among slices in application volume Volume1. Execute the following command on Node1 or Node2 in the primary domain.
# sdxslice -M -c Class1 -d Disk2 -v Volume1 -a jrm=off |
On backup server Node3, after Disk1 data is restored from tape, the slice on Disk2 is supposed to be reattached to application volume Volume1 in the primary domain. At this point the entire volume data must be copied to the attached slice. For this reason, the JRM mode of a detached slice must be set to off in advance.
If access can be gained from backup server Node3 to Disk2, data can be restored from tape back to both Disk1 and Disk2 on Node3. Under these circumstances, this procedure (detaching a slice) should not be performed.
19) Viewing the configuration and status of the application volume
On Node1 and Node2 in the primary domain, see the configuration and status of application volume Volume1 that is restore target. Confirm that Volume1 is in STOP status and that only restore target slice Volume1.Disk1 is in STOP status among the slices constituting the volume and the other slices are in TEMP or TEMP-STOP status. If the volume or slice status is invalid, repair it referring to "Volume Status Abnormality" or "Slice Status Abnormality."
# 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 emcpower1 8380800 Node1:Node2 ENABLE disk Disk2 mirror Class1 Group1 emcpower2 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 STOP volume * Class1 Group1 * * 1114112 8290303 7176192 FREE OBJ CLASS GROUP DISK VOLUME STATUS ------ ------- ------- ------- ------- -------- slice Class1 Group1 Disk1 Volume1 STOP slice Class1 Group1 Disk2 Volume1 TEMP |
When access can be gained from backup server Node3 to all of the disks constituting Volume1 (Disk1 and Disk2), you must confirm that all of the slices of Volume1 are in the STOP status.
20) Creating a shadow volume for restore
On backup server Node3, create a volume for restore (shadow volume) in disk emcpower1. The following settings are necessary on backup server Node3.
20-1) Registering a shadow disk
Register disk emcpower1 with shadow class Class3, and name it Disk1.
# sdxshadowdisk -M -c Class3 -d emcpower1=Disk1 |
The disk name must correspond to the disk name assigned to emcpower1 in step 1-1). The disk names assigned in 1-1) can be viewed in the NAME field displayed with the sdxinfo command in step 19).
The class can be assigned any name. However, if Node3 resides in the same domain as Node1 and Node2, it must be assigned a name different from the name of the class created in step 1-1).
When access can be gained from backup server Node3 to all of the disks constituting Volume1 (emcpower1 and emcpower2), you must register all of the disks constituting Volume1 (emcpower1 and emcpower2) with a shadow class.
20-2) Creating a shadow group
Connect shadow disk Disk1 to mirror type shadow group Group1.
# sdxshadowdisk -C -c Class3 -g Group1 -d Disk1 |
When access can be gained from backup server Node3 to all of the disks constituting Volume1 (emcpower1 and emcpower2), you must connect all of the disks constituting Volume1 (emcpower1 and emcpower2) to a shadow group.
20-3) Creating a shadow volume
Create shadow volume Volume1 to shadow group Group1.
# sdxshadowvolume -M -c Class3 -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 19).
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 19).
The volume can be assigned any name.
20-4) Setting the access mode of the shadow volume
Activate shadow volume Volume1 in the read and write access mode (rw).
# sdxshadowvolume -F -c Class3 -v Volume1 |
20-5) Viewing the shadow volume configuration
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 Class3 OBJ NAME TYPE SCOPE SPARE ------ ------- -------- ----------- ----- class Class3 local Node3 0 OBJ NAME TYPE CLASS GROUP DEVNAM DEVBLKS DEVCONNECT STATUS ------ ------- ------ ------- ------- ------- -------- ---------------- ------- disk Disk1 mirror Class3 Group1 emcpower1 8380800 Node3 ENABLE OBJ NAME CLASS DISKS BLKS FREEBLKS SPARE ------ ------- ------- ------------------- -------- -------- ----- group Group1 Class3 Disk1 8290304 7176192 0 OBJ NAME CLASS GROUP SKIP JRM 1STBLK LASTBLK BLOCKS STATUS ------ ------- ------- ------- ---- --- -------- -------- -------- -------- volume * Class3 Group1 * * 0 65535 65536 PRIVATE volume Volume1 Class3 Group1 off off 65536 1114111 1048576 ACTIVE volume * Class3 Group1 * * 1114112 8290303 7176192 FREE OBJ CLASS GROUP DISK VOLUME STATUS ------ ------- ------- ------- ------- -------- slice Class3 Group1 Disk1 Volume1 ACTIVE |
21) Restoring from tape
On backup server Node3, restore shadow volume data from tape to which it was backed up in step 8). In the following examples, restore data held in shadow volume Volume1 from a tape medium of tape device /dev/rmt/0.
For details on the restore method, see the manuals of file systems to be restored and used commands.
In a GFS Shared File System
Restore through the method as described in step 21a).
21a) When restoring data held in a raw device with the dd(1M) command
# dd if=/dev/rmt/0 of=/dev/sfdsk/Class3/rdsk/Volume1 bs=32768 |
21b) When restoring a ufs file system with the tar(1) command
21b-1) Create a ufs file system to shadow volume Volume1.
# newfs /dev/sfdsk/Class3/rdsk/Volume1 |
21b-2) Mount the ufs file system on shadow volume Volume1 on /mnt2, a temporary mount point.
# mkdir /mnt2 |
21b-3) Restore data held in the file system from tape.
# cd /mnt2 |
21b-4) Unmount the file system mounted in step 21b-2).
# cd / |
21c) When restoring a ufs file system with the ufsrestore(1M) command
21c-1) Create a ufs file system to shadow volume Volume1.
# newfs /dev/sfdsk/Class3/rdsk/Volume1 |
21c-2) Mount the ufs file system on shadow volume Volume1 on /mnt2, a temporary mount point.
# mkdir /mnt2 |
21c-3) Restore data held in the file system from tape.
# cd /mnt2 |
21c-4) Delete the temporary file created by the ufsrestore(1M) command.
# rm /mnt2/restoresymtable |
21c-5) Unmount the file system mounted in step 21c-2).
# cd / |
21d) When restoring the sfxfs file system (GFS Local File System or SynfinityFile file system) with the tar(1) command.
21d-1) Create the sfxfs file system to shadow volume Volume1.
# sfxnewfs /dev/sfdsk/Class3/rdsk/Volume1 |
21d-2) Mount the sfxfs file system on shadow volume Volume1 on /mnt2, a temporary mount point.
# mkdir /mnt2 |
21d-3) Restore data held in the file system from tape.
# cd /mnt2 |
21d-4) Unmount the file system mounted in step 21d-2).
# cd / |
21e) When restoring the sfxfs file system (GFS Local File System or SynfinityFile file system) with the sfxrestore(1M) command
21e-1) Create the sfxfs file system to shadow volume Volume1.
# sfxnewfs /dev/sfdsk/Class3/rdsk/Volume1 |
21e-2) Mount the sfxfs file system on shadow volume Volume1 on /mnt2, a temporary mount point.
# mkdir /mnt2 |
21e-3) Restore data held in the file system from tape.
# cd /mnt2 |
21e-4) Delete the temporary file created by the sfxrestore(1M) command.
# rm /mnt2/restoresymtable |
21e-5) Unmount the file system mounted in step 21e-2).
# cd / |
22) Removing the shadow volume
After the restore process is complete, remove the shadow volume to prevent improper access to it. The following procedure must be performed on backup server Node3.
22-1) Stopping the shadow volume
Stop shadow volume Volume1.
# sdxshadowvolume -F -c Class3 -v Volume1 |
22-2) Removing the shadow volume
Remove shadow volume Volume1.
# sdxshadowvolume -R -c Class3 -v Volume1 |
22-3) Removing the shadow group
Remove shadow group Group1.
# sdxshadowgroup -R -c Class3 -g Group1 |
22-4) Removing the shadow disk
Remove shadow disk Disk1.
# sdxshadowdisk -R -c Class3 -d Disk1 |
When access can be gained from backup server Node3 to all of the disks constituting Volume1 (emcpower1 and emcpower2), you must remove all of the disks registered with shadow class Class3 in step 20) (emcpower1 and emcpower2).
23) Resuming the services and reattaching the slice to the application volume
Resume the services in the primary domain. The following settings are necessary on the node that runs the services.
In the following example resuming the services is put above resynchronizing the application volume. Through this procedure the services are resumed first and then resynchronization of the volume is secured during the services operation. If resynchronizing the volume should be put above resuming the services, the procedure should be followed in the order of steps 23-1), 23-2), 23-4), 23-5) (confirming that the synchronization copying is complete), and 23-3).
23-1) Activating the application volume
Activate application volume Volume1.
# sdxvolume -N -c Class1 -v Volume1 |
23-2) Reconfiguring the partition information of the sfxfs file system
When application volume Volume1 is used as the sfxfs file system, reconfigure the partition information.
# sfxadm /dev/sfdsk/Class1/rdsk/Volume1 |
23-3) Resuming the services
When the file system on application volume Volume1 was unmounted in step 16), mount it again.
Start the applications using Volume1.
23-4) Reattaching the slice to the application volume
Reattach slice Volume1.Disk2 temporarily detached from application volume Volume1 in step 18).
# sdxslice -R -c Class1 -d Disk2 -v Volume1 |
After returning from the command, synchronization copying from the slice on Disk1 of volume Volume1 to the slice on Disk2 is executed.
23-5) Viewing the copy status
The status of synchronization copying can be viewed using the sdxinfo -S command. The copy destination slice is in COPY status if copying is in progress and it will be in ACTIVE status after the copy process ends normally (note, however, that it will be in STOP status when Volume1 is in 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 |