7.6 Mirror Disk

7.6 Mirror Disk

In case of MCCS needed data cannot be shared among nodes in a cluster, namely NAS or DAS, may not use latest data after failover. In this case, Mirror disk is used when there is no external shared disk, and is replicated between two nodes by using replication component. MCCS provides replication function of DataKeeper from SIOS corporation (OEM Product) and Mirror Disk Agent manages this replicated data set. 

It functions properly according to the state and role of mirror disk. Actions such as state and role of mirror disk are all recorded in the system event log, and this information will be sent to MCCS through event log monitor module.
MCCS Event Module is activated when MCCS service starts.
Data replication software operates by creating mirror set for volumes between two nodes.
The primary server has source disk and the secondary server has target disk which is an exact replica of its source.
Client is only available to read/write in the source disk, changed block of this is replicated to the target disk through the TCP/IP network connection. At this point, target is in lock state and read/write is not allowed. This is to ensure data integrity by preventing the use of this.

Table of Contents

[Figure] Mirroring Configuration

 

 

Mirror Mode

Mirror mode employs both asynchronous and synchronous mirroring schemes. Understanding the advantages and disadvantages between synchronous and asynchronous mirroring is essential to the correct operation of this.

Async Mode

With asynchronous mirroring, each write is captured and a copy of this is made. That copy is queued to be transmitted to the target system as soon as the network will allow it. Meanwhile, the original write request is committed to the underlying storage device and control is immediately returned to the application that initiated the write. At any given time, there may be write transactions waiting in the queue to be sent to the target machine.  But it is important to understand that these writes reach the target volume in time order, so the integrity of the data on the target volume is always a valid snapshot of the source volume at some point in time.  Should the source system fail, it is possible that the target system did not receive all of the writes that were queued up, but the data that has made it to the target volume is valid and usable.

Sync Mode

With synchronous mirroring, each write is captured and transmitted to the target system to be written on the target volume at the same time that the write is committed to the underlying storage device on the source system.  Once both the local and target writes are complete, the write request is acknowledged as complete and control is returned to the application that initiated the write.  With synchronous mirroring, each write is intercepted and transmitted to the target system to be written on the target volume at the same time that the write is committed to the underlying storage device on the source system.  Once both the local and target writes are complete, the write request is acknowledged as complete and control is returned to the application that initiated the write.  

 

Adding

Add the mirror disk resource to a group.

  1. When add a resource from a group name, select a group → right click → 'Add Resource'. Or select Edit(E) from the main menu bar → select 'Add Resource'. Or select 'Add Resource' icon from the tool bar.

  2. Select 'MirrorDisk' from Resource Type lists and click 'Next' button. When add a resource from the MirrorDisk resource type name, this step will be skipped.

  3. Enter the resource name. If you skip enter resource name, this will given 'Mirror_value' which value is selected driver letter.(Ex: Mirror_G)

  4. Select the source node and driver letter.


    [Figure] Adding mirror disk resource

     

  5. As 'Additional Settings', Mirror Type and Check Disk option is available and click 'OK' button.

    [Figure] Defining mirror type and check disk option

     

  6. When click OK button, following warning message will be displayed and click 'OK' button if the informations are correct.
    If you select wrong sever, click cancel button.

     
    [Figure] Alert popup message after click OK button

  7. Click 'Finish' button to add the mirror disk resource.  

 

Deleting

Select resource type → right click → delete resource.
(Current online mirror disk resource cannot be deleted. So it should be taken offline before delete it.)

  1. Click "Delete resource" and a confirming message about deleting resource will appear. 


    [Figure] check resource view

  2. Click "OK" and a confirming message about deleting the mirror configuration will appear.


    [Figure] Delete mirror disk view

  3. Click "OK" and mirror disk is deleted. 

 

State

The following table explains the state of mirror disk resource.

State

Agent command

Description

Note

State

Agent command

Description

Note

Online

Source disk is accessible to read/write.

Offline

It locks the mirror disk using LOCKVOLUME command. Both source and target disk cannot accessible from each node.

 

Monitoring

The monitoring process is also determined by the mirror disk status and roles.
The kernel driver of replication component records an event in the system event log when the mirror disk status is changed.
The MCCS event monitor is registered as an event receiver when starting the MCCS service. When a system event occurs, it will be automatically informed and it will detect the mirror disk status and role changes.
Once the status and the role are determined, a disk writing test is performed to finalize the resource state.

If the writing test is successful, it is regarded as the online state. Otherwise, it is regarded as the offline state.

If a user unlocks the target disk while the mirror disk is online, MCCS will automatically lock it again. Thus, the target disk of the node with the online mirror disk cannot be unlocked.

 

Offline

Source and target disk is not fault state but locked so that cannot access both disk.

Online

Type of command is determined by the role of the mirror disk at the node.

<Source role disk>
1. It unlocks the disk and read/writeable.
2. Unlocking is done by 'UNLOCKVOLUME' of the replicaiton component. The write function is executed after changing the MountReadOnly in registry value of the copying program to 0. After writing is available, the value is changed back to 1.

<Target role disk>
1. This command will be failed if the mirror status is not "Mirroring".
2. If the mirror disk is fully synchronized, you can change the mirror role. Such a process is determined by the node status (A).
3. If you cannot connect to mirror driver of node A, use the DELETEMIRROR command to delete the existing mirror disk. After that, switch the target and the source, and use the CREATEMIRROR command to create the reverse mirror disk.
When creating the mirror, if you set the option to 0x1, they are not all synchronized.
4. If you cannot connect the mirror driver of node A, use the DELETELOCALMIRRORONLY command to delete the mirror configuration of node B only. After that, use the CREATEMIRROR command to configure the reverse mirror disk.
Now, node A does not respond. The 0x2 option is added so that it does not wait until the target mirror disk is created.
If the final volume is locked, unlock it and change the MountReadOnly option to 0. After writing, change it back to 1.
If the mirror disk is not defined, it is processed as a failure without any operation.

 

Monitoring

Refer to the description of monitoring as above.

 

Fault

Fail on writing test in online state or fail on attempts to bring online.

*Failover disabled state
When a mirror network communication failure, target node or target disk failure occurs, the mirror status is changed from 'MIRRORING' to other, such as 'MIRROR_PAUSED'.
If failover takes place while the mirror status is not 'MIRRORING', it may cause data losses or corruptions.
To prevent from this, MCCS disabled the failover mode in this case.
If the failover mode is disabled, no failover will take place even if fault occurs or attempt to switchover.
If mirror network communication failures are recovered, and it is re-established, MCCS will automatically perform RESYNC. When the mirror status is changed to MIRRORING, the failover mode will be also automatically enabled.

 

Online

Refer to the above online command.

 

Offline

It locks the mirror disk using LOCKVOLUME command. Both source and target disk cannot accessible from each node.