Top
PRIMECLUSTERGlobal Disk Services Configuration and AdministrationGuide 4.5
FUJITSU Software

6.8.3 Backing Up and Restoring Using Snapshots from a Proxy Volume

This sub-section describes the method of backing up data from and restoring data back to logical volumes in the primary domain through a backup server in another domain by use of snapshots from the proxy volume.

6.8.3.1 System Configuration

Figure 6.36 System Configuration

GDS: Global Disk Services
GDS: Snapshot: Global Disk Services Snapshot

Information

In the primary domain, SynfinityDisk and SynfinityCluster are also available instead of GDS , GDS Snapshot and PRIMECLUSTER.

Figure 6.37 Object Configuration in Normal Operation

6.8.3.2 Summary of Backup

Data in a proxy volume parted from the master volume during the services operation can be backed up to tape.

To secure consistency of data in the proxy volume to be parted, the services should be stopped temporarily when it is parted.

Information

Consistency of Snapshot Data

When detaching a proxy volume while the service is operating, data consistency must be secured through the method specific to that software, such as a file system and a database system, which manages volume data. For details, see "A.2.29 Ensuring Consistency of Snapshot Data."

Figure 6.38 Backup

Figure 6.39 Object Configuration When Backing Up

Figure 6.40 Backup Schedule

6.8.3.3 Summary of Restore from a Proxy Volume

If master volume data is damaged while a proxy volume is parted from the master volume used for the services operation, data can be restored from the proxy volume back to the master volume.

When restoring, access to the volume must be suspended temporarily.

Figure 6.41 Restore from a Proxy Volume

Figure 6.42 Object Configuration When Restoring from a Proxy Volume

Figure 6.43 Schedule to Restore a Proxy Volume

6.8.3.4 Summary of Restore from Tape

If master volume data is damaged while the master volume for the services operation and the proxy volume are in the joined state, the proxy data is also damaged. In this case data can be restored from tape back to the master volume.

Data can be restored while the service is stopped and the master volume is not in use.

Figure 6.44 Restore from Tape

Information

This sub-section shows an example when access can be gained from backup server Node3 to all of the disks constituting master volume Volume1.

Information

When access can be gained from backup server Node3 to all of the disks constituting master volume Volume1 and the disk unit's copy function is used to synchronize a master and a proxy, parting proxy volume Volume2 is not required to restore data from tape.

Information

When access cannot be gained from the backup server to the disks constituting the master volume, while proxy volume Volume2 is parted, copy data from tape to the proxy volume, and then restore master volume data using the proxy volume.

Figure 6.45 Object Configuration When Restoring from Tape

Figure 6.46 Schedule to Restore from Tape

6.8.3.5 Summary of Procedure

Figure 6.47 Outline of the Configuration Procedure

Figure 6.48 Outline of the Backup Procedure

Figure 6.49 Outline of the Procedure for Restoring from a Proxy Volume

Figure 6.50 Outline of the Procedure for Restoring from Tape

6.8.3.6 Configuring an Environment

Note

Automatic Resource Registration

If the backup server resides in a cluster domain (called a backup domain), those disks that are registered as resources in the primary domain or are to be registered with a shadow class in the backup domain may not be involved in the resource registration in the backup domain. In the backup domain, those relevant disks must be described in the Excluded Device List prior to executing the automatic resource registration. For details on the automatic resource registration, see "PRIMECLUSTER Installation and Administration Guide."


1) Creating a master volume

In the primary domain, create the master volume that is used for the services operation.

The following example creates mirror group Group1 that consists of disks c1t1d1 and c1t1d2 to shared class Class1 that is shared on nodes Node1 and Node2 and creates mirror volume Volume1.

# sdxdisk -M -c Class1 -a type=shared,scope=Node1:Node2 -d c1t1d1=Disk1,c1t1d2=Disk2
# sdxdisk -C -c Class1 -g Group1 -d Disk1,Disk2
# sdxvolume -M -c Class1 -g Group1 -v Volume1 -s 1048576

2) Creating and joining a proxy group

Create a proxy volume as the copy destination of the master volume and join it to the master volume in the primary domain. The following settings are necessary on Node1 or Node2 in the primary domain.

2-1) Creating a proxy volume

Create a proxy volume in the same size as master volume Volume1 to shared class Class1 to which Volume1 belongs.

The following example creates mirror group Group2 that consists of only disk c1t1d3 and creates mirror volume Volume2.

# sdxdisk -M -c Class1 -d c1t1d3=Disk3
# sdxdisk -C -c Class1 -g Group2 -d Disk3
# sdxvolume -M -c Class1 -g Group2 -v Volume2 -s 1048576

2-2) Stopping the proxy volume

Stop proxy volume Volume2 on all nodes.

# sdxvolume -F -c Class1 -v Volume2 -e allnodes

2-3) Joining the proxy volume

Relate and join proxy volume Volume2 to master volume Volume1.

# sdxproxy Join -c Class1 -m Volume1 -p Volume2

After returning from the command, synchronization copying from Volume1 to Volume2 is executed, and as a result, they become synchronized.

6.8.3.7 Backing Up

3) Parting the proxy volume

Part the proxy volume from the master volume. The following procedure must be performed on Node1 or Node2 in the primary domain.

Information

The following example secures data consistency by stopping the services when the proxy volume is parted. Steps 3-2) and 3-4) are not required if software, such as a file system and a database system, that manages volume data provides functionality ensuring data consistency or repairing consistency for a parted volume is present. Alternatively, data consistency must be secured with the method specific to that software. For details, see "A.2.29 Ensuring Consistency of Snapshot Data."

3-1) Viewing the status of the proxy volume

Confirm that master volume Volume1 and proxy volume Volume2 are in sync with each other.

Confirm that proxy volume Volume2 is in the joined state. If Join is displayed in the PROXY field, the proxy volume is in the joined state.

# sdxinfo -V -c Class1 -o Volume2 -e long
OBJ    NAME    TYPE   CLASS   GROUP   DISK   MASTER  PROXY ...
------ ------- ------ ------- ------- ------ ------- ----- ...
volume *       mirror Class1  Group2  *      *       *     ...
volume Volume2 mirror Class1  Group2  *      Volume1 Join  ...
volume *       mirror Class1  Group2  *      *       *     ...

Confirm that data in all the slices of proxy volume Volume2 is valid (STOP).

# sdxinfo -S -c Class1 -o Volume2
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group2  Disk3   Volume2 STOP

If data is not valid (STOP), repair the slice status referring to "F.1.1 Slice Status Abnormality."

3-2) Stopping the services

To secure consistency of data in proxy volume Volume2 parted, exit all applications using master volume Volume1 on Node1 and Node2.

When Volume1 is used as a file system, it should be unmounted.

3-3) Parting the proxy volume

Part proxy volume Volume2 from master volume Volume1.

# sdxproxy Part -c Class1 -p Volume2 -a pjrm=off

Note

Just Resynchronization Mode for Proxy

On backup server Node3, data may be written from Node3 into Volume2 when data in Volume2 is backed up to tape. GDS in the primary domain cannot recognize the write occurrence from Node3. Consequently, if the JRM mode for proxies of the parted volume is on, the portions updated from Node3 may not be involved in resynchronization copying performed when the proxy volume is rejoined or restored. If this happens, synchronization of master volume Volume1 and proxy volume Volume2 is no longer ensured. For this reason, the JRM mode of a parted proxy volume must be set to off in advance.

When synchronization copying between a master and a proxy is conducted by the disk unit's copy function, the disk unit's copy function recognizes such a written occurrence from Node3. In this case, only the difference between the master and the proxy is copied through synchronization copying with the disk unit's copy function when the proxy is rejoined regardless of the value specified to the JRM mode for proxies. However, synchronization copying on restore is conducted by the soft copy function. Therefore, the JRM mode of a parted proxy volume should be set to off in advance.

3-4) Resuming the services

When the file system was unmounted in step 3-2), mount it again.

Resume the application stopped in step 3-2).

3-5) Stopping the proxy volume

To prevent improper access to proxy volume Volume2, stop Volume2.

# sdxvolume -F -c Class1 -v Volume2 -e allnodes

4) Viewing the configuration of the proxy volume

On Node1 or Node2 in the primary domain, view the configuration of proxy volume Volume2 that is the backup target.

# sdxinfo -c Class1 -o Volume2
# sdxinfo -c Class1 -o Volume2 -e long

5) Creating a shadow volume for backup

On backup server Node3, create a volume for backup (shadow volume).

# sdxshadowdisk -M -c Class2 -d c1t1d3=Disk3
# sdxshadowdisk -C -c Class2 -g Group2 -d Disk3
# sdxshadowvolume -M -c Class2 -g Group2 -v Volume2 -s 1048576

Note

Master 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 using the sdxinfo command.

Point

  • The shadow volume must be created in the same configuration as the proxy volume created in step 2).

  • The shadow disk name must correspond to the disk name assigned in the primary domain. The disk names assigned in the primary domain can be viewed in the NAME field for disk information displayed with the sdxinfo command in step 4).

  • The class, the group, and the volume can be assigned any name.

  • The order of connecting shadow disks to a shadow group must correspond to the order of connecting disks to a group in the primary domain. The order of connecting disks in the primary domain can be viewed in the DISKS field for group information displayed with the sdxinfo command in step 4).

  • The stripe width of a shadow group must correspond to the stripe width in the primary domain. The stripe width specified in the primary domain can be viewed in the WIDTH field for group information displayed with the sdxinfo -e long command in step 4).

  • The shadow volume must be created in the size corresponding to the proxy volume size. The proxy volume size can be viewed in the BLOCKS field for volume information displayed with the sdxinfo command in step 4).

  • 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 4).


6) Backing up to tape

On backup server Node3, back up data in the shadow volume to tape. In the following examples, back up data in shadow volume Volume2 to a tape medium of tape device /dev/rmt/0.

See

For details on the backup method, see the manuals of file systems to be backed up and used commands.

Information

In a GFS Shared File System

Back up through the method as described in step 6a).

6a) When backing up data held in a raw device with the dd(1M) command

# dd if=/dev/sfdsk/Class2/rdsk/Volume2 of=/dev/rmt/0 bs=32768

6b) When backing up a ufs file system with the tar(1) command

6b-1) Activate shadow volume Volume2 in the read and write access mode (rw).

# sdxshadowvolume -F -c Class2 -v Volume2
# sdxshadowvolume -N -c Class2 -v Volume2 -e mode=rw

6b-2) Check and repair consistency of the ufs file system on shadow volume Volume2.

If the file system was unmounted when the proxy volume was parted in step 3), this step can be skipped.

# fsck -F ufs /dev/sfdsk/Class2/rdsk/Volume2

6b-3) Mount the ufs file system on shadow volume Volume2 on /mnt1, a temporary mount point, in the read only mode.

# mkdir /mnt1
# mount -F ufs -o ro /dev/sfdsk/Class2/dsk/Volume2 /mnt1

6b-4) Back up data held in the file system to tape.

# cd /mnt1
# tar cvf /dev/rmt/0 .

6b-5) Unmount the file system mounted in step 6b-3).

# cd /
# umount /mnt1
# rmdir /mnt1

6c) When backing up a ufs file system with the ufsdump(1M) command

6c-1) Activate shadow volume Volume2 in the read and write access mode (rw).

# sdxshadowvolume -F -c Class2 -v Volume2
# sdxshadowvolume -N -c Class2 -v Volume2 -e mode=rw

6c-2) Check and repair consistency of the ufs file system on shadow volume Volume2.

If the file system was unmounted when the proxy volume was parted in step 3), this step can be skipped.

# fsck -F ufs -y /dev/sfdsk/Class2/rdsk/Volume2

6c-3) Back up data held in the file system to tape.

# ufsdump 0ucf /dev/rmt/0 /dev/sfdsk/Class2/rdsk/Volume2

7) Removing the shadow volume

After the backup process is complete, remove the shadow volume to prevent improper access to it. The following settings are necessary on backup server Node3.

# sdxshadowvolume -F -c Class2 -v Volume2
# sdxshadowvolume -R -c Class2 -v Volume2
# sdxshadowgroup -R -c Class2 -g Group2
# sdxshadowdisk -R -c Class2 -d Disk3

8) Rejoining the proxy volume

Rejoin the proxy volume to the master volume. The following procedure must be performed on Node1 or Node2 in the primary domain.

8-1) Rejoining the proxy volume

Rejoin proxy volume Volume2 to master volume Volume1.

# sdxproxy Rejoin -c Class1 -p Volume2

After returning from the command, synchronization copying from Volume1 to Volume2 is executed.

8-2) Viewing the copy status

The status of synchronization copying can be viewed using the sdxinfo -S command. The slice of proxy volume Volume2 as the copy destination is in COPY status if copying is in progress and it will be in STOP status after the copy process ends normally.

# sdxinfo -S -c Class1 -o Volume2
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group2  Disk3   Volume2 STOP

6.8.3.8 Restoring from a Proxy Volume

9) Stopping the services

Exit all applications using master volume Volume1 on Node1 and Node2 in the primary domain.

When Volume1 is used as a file system, it should be unmounted.


10) Stopping the master volume

Stop master volume 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

11) Restoring from the proxy volume

In the primary domain, restore data from proxy volume Volume2 back to master volume Volume1. Execute the following command on Node1 or Node2.

# sdxproxy RejoinRestore -c Class1 -p Volume2

After returning from the command, synchronization copying from Volume2 to Volume1 is executed.


12) Resuming the services

After synchronization copying is started from proxy volume Volume2 to master volume Volume1 in step 11), the services can be resumed before the copy process is completed.

The following procedure must be performed on the node that runs the services.

12-1) Activating the master volume

Activate master volume Volume1.

# sdxvolume -N -c Class1 -v Volume1

12-2) Resuming the services

When the file system on master volume Volume1 was unmounted in step 9), mount it again.

Start the applications using Volume1.

12-3) Viewing the copy status

The status of synchronization copying from proxy volume Volume2 to master volume Volume1 executed in step 11), can be viewed using the sdxinfo -S command. The slice of master volume Volume1 as the copy destination is in COPY status if copying is in progress and it will be in ACTIVE status after the copy process ends normally.

# sdxinfo -S -c Class1 -o Volume1
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group1  Disk1   Volume1 ACTIVE
slice  Class1  Group1  Disk2   Volume1 ACTIVE

Information

Master volume Volume1 and proxy volume Volume2 are made the joined state through step 11). If data in Volume1 is damaged while they are in the joined state, the proxy data is also damaged. Thus data cannot be restored from Volume2 back to Volume1. Therefore, once the synchronization copying from Volume2 to Volume1 is complete, it is recommended to part Volume2 from Volume1. For details on the procedure for parting a proxy volume, see step 3) described in "6.8.3.7 Backing Up."

6.8.3.9 Restoring from Tape

This sub-section shows an example that access can be gained from backup server Node3 to all of the disks constituting master volume Volume1.

Information

When Using a Disk Unit's Copy Function

When access can be gained from backup server Node3 to all of the disks constituting master volume Volume1 and the disk unit's copy function is used to synchronize a master and a proxy, parting the proxy volume in step 15) is not required.

Information

When access cannot be gained from the backup server to the disks constituting the master volume

While proxy volume Volume2 is parted, copy data from tape to the proxy volume, and then restore master volume data using the proxy volume.


13) Stopping the services

Exit all applications using master volume Volume1 on Node1 and Node2 in the primary domain.

When Volume1 is used as a file system, it should be unmounted.


14) Stopping the master volume

On Node1 and Node2 in the primary domain, stop master volume Volume1 to prevent improper access to it. Execute the following command on Node1 or Node2.

# sdxvolume -F -c Class1 -v Volume1 -e allnodes

15) Parting the proxy volume

In the primary domain, part proxy volume Volume2 from master volume Volume1. Execute the following command on Node1 or Node2.

# sdxproxy Part -c Class1 -p Volume2 -a pjrm=off

Note

Just Resynchronization Mode for Proxy

After data held in master volume Volume1 is restored from tape on backup server Node3, proxy volume Volume2 is supposed to be rejoined to master volume Volume1. At this point the entire Volume1 data must be copied to Volume2. For this reason, the JRM mode of a parted proxy volume must to be set to off in advance.

Information

When Using a Disk Unit's Copy Function

When the disk unit's copy function is used to synchronize a master and a proxy, this procedure (parting a proxy) is not required.

Information

When access cannot be gained from the backup server to the disks constituting the master volume

After proxy volume Volume2 is parted, inactivate Volume2 on Node1 and Node2 to prevent Volume2 from being written in improperly.


16) Viewing the status and configuration of the master volume

On Node1 and Node2 in the primary domain, view the configuration and status of master volume Volume1 that is the restore target. Confirm that all of the slices constituting Volume1 are in STOP status. If the status of a slice is invalid, repair it referring to "F.1.1 Slice Status Abnormality."

# sdxinfo -S -c Class1 -o Volume1
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group1  Disk1   Volume1 STOP
slice  Class1  Group1  Disk2   Volume1 STOP

Information

When Using a Disk Unit's Copy Function

When the proxy volume was not parted in step 15) because the disk unit's copy function is used for synchronizing a master and a proxy, you must also confirm that all of the slices constituting proxy volume Volume2 are in STOP status.

Information

When access cannot be gained from the backup server to the disks constituting the master volume

View the configuration and the status of proxy volume Volume2 that is the restore target.


17) Creating a shadow volume for restoration

On backup server Node3, create a volume for restoration (shadow volume).

17-1) Creating a shadow volume

# sdxshadowdisk -M -c Class2 -d c1t1d1=Disk1,c1t1d2=Disk2
# sdxshadowdisk -C -c Class2 -g Group1 -d Disk1,Disk2
# sdxshadowvolume -M -c Class2 -g Group1 -v Volume1 -s 1048576

Note

Master 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 using the sdxinfo command.

Point

  • The shadow volume must be created in the same configuration as the master volume created in step 1).

  • The shadow disk name must correspond to the disk name assigned in the primary domain. The disk names assigned in the primary domain can be viewed in the NAME field for disk information displayed with the sdxinfo command in step 16).

  • The class, the group, and the volume can be assigned any name.

  • The order of connecting shadow disks to a shadow group must correspond to the order of connecting disks to a group in the primary domain. The order of connecting disks in the primary domain can be viewed in the DISKS field for group information displayed with the sdxinfo command in step 16).

  • The stripe width of a stripe type shadow group must correspond to the stripe width of a stripe group in the primary domain. The stripe width in the primary domain can be viewed in the WIDTH field for group information displayed with the sdxinfo -e long command in step 16).

  • A shadow volume must be created in the size corresponding to the master volume size. The master volume size can be viewed in the BLOCKS field for volume information displayed with the sdxinfo command in step 16).

  • 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 16).

Information

When access cannot be gained from the backup server to the disks constituting the master volume

Create a shadow volume for restoration in a similar procedure that created a proxy volume in step 2).

17-2) Setting the access mode of the shadow volume

Activate shadow volume Volume1 in the read and write access mode (rw).

# sdxshadowvolume -F -c Class2 -v Volume1
# sdxshadowvolume -N -c Class2 -v Volume1 -e mode=rw

17-3) 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

18) Restoring from tape

On backup server Node3, restore shadow volume data from tape to which it was backed up in step 6). In the following examples, restore data held in shadow volume Volume1 from a tape medium of tape device /dev/rmt/0.

See

For details on the restore method, see the manuals of file systems to be restored and used commands.

Information

In a GFS Shared File System

Restore through the method as described in step 18a).

18a) When restoring data held in a raw device with the dd(1M) command

# dd if=/dev/rmt/0 of=/dev/sfdsk/Class2/rdsk/Volume1 bs=32768

18b) When restoring a ufs file system with the tar(1) command

18b-1) Create a ufs file system to shadow volume Volume1.

# newfs /dev/sfdsk/Class2/rdsk/Volume1

18b-2) Mount the ufs file system on shadow volume Volume1 on /mnt1, a temporary mount point.

# mkdir /mnt1
# mount -F ufs /dev/sfdsk/Class2/dsk/Volume1 /mnt1

18b-3) Restore data held in the file system from tape.

# cd /mnt1
# tar xvf /dev/rmt/0

18b-4) Unmount the file system mounted in step 18b-3).

# cd /
# umount /mnt1
# rmdir /mnt1

18c) When restoring a ufs file system with the ufsrestore(1M) command

18c-1) Create a ufs file system to shadow volume Volume1.

# newfs /dev/sfdsk/Class2/rdsk/Volume1

18c-2) Mount the ufs file system on shadow volume Volume1 on /mnt1, a temporary mount point.

# mkdir /mnt1
# mount -F ufs /dev/sfdsk/Class2/dsk/Volume1 /mnt1

18c-3) Restore data held in the file system from tape.

# cd /mnt1
# ufsrestore rvf /dev/rmt/0

18c-4) Delete the temporary file created by the ufsrestore(1M) command.

# rm /mnt1/restoresymtable

18c-5) Unmount the file system mounted in step 18c-2).

# cd /
# umount /mnt1
# rmdir /mnt1

19) Removing the shadow volume

After the restore process is complete, remove the shadow volume to prevent improper access to it. The following settings are necessary on backup server Node3.

# sdxshadowvolume -F -c Class2 -v Volume1
# sdxshadowvolume -R -c Class2 -v Volume1
# sdxshadowgroup -R -c Class2 -g Group1 # sdxshadowdisk -R -c Class2 -d Disk1 # sdxshadowdisk -R -c Class2 -d Disk2

20) Resuming the services

Resume services in the primary domain. The following procedure must be performed on the node that runs the services.

Information

When access cannot be gained from the backup server to the disks constituting the master volume

Before the services are resumed, restore data from proxy volume Volume2 to master volume Volume1. For the procedure see "6.8.3.8 Restoring from a Proxy Volume."

20-1) Activating the master volume

Activate master volume Volume1.

# sdxvolume -N -c Class1 -v Volume1

20-2) Resuming the services

When the file system on Volume1 was unmounted in step 13), mount it again.

Start the applications using Volume1.