...
fsradm primary [resource name]
Info |
---|
Switching the role of a resource to primary is called a promotion, and switching the role to secondary is called a demotion. |
Local files at the time of initial synchronization are defaulted to the Inconsistent state, which is not consistent with both nodes, so promotion is denied by default. During initial promotion, the user must explicitly inform the user that the resource will be sourced through forced (-f option) promotion.
...
Info | ||
---|---|---|
| ||
Unlike missing files, orphaned files are defined as files left without any connection to the target's replication path. This doesn't happen in normal duplication situations, but it happens when there is unintentional file manipulation in a situation where the target file is not protected. When an orphaned file occurs, it is processed according to the FSR's orphaned file response policy, and basically, it is processed as a backup to a specific path of the target. You can also specify the option to process the deletion immediately without the need for backup. |
Failover
Failover is usually defined as a procedure to overcome a failure situation. Failover mentioned here is a planned failover, which refers to the process of demoting the source node in the replication cluster and then changing the target node to the source node role to activate data for service.
Demote the resource on the source node.
Code Block |
---|
c:\>fsradm secondary r0
done |
Promote the target node's resource.
Code Block |
---|
c:\>fsradm primary r0
done |
If the promotion is successful, the transfer is considered complete.
Info |
---|
Considerations When switching over, the resource file status of the target node is guaranteed to be in the UpToDate status. If the target does not have the latest data due to disconnection of the replication connection, or if the resource of the target node is in an inconsistent state that is being synchronized, it is a state that does not match with the source, so you must limit the transfer. |
FileLock
Files copied to the target must be protected from write I/O other than the mirroring data received from the source. Otherwise, data consistency to maintain a duplicate copy is not guaranteed. In particular, when operating HA, the secondary file lock must be activated to protect data.
File lock is generally activated in the secondary and deactivated in the primary depending on the role of the resource to operate as a target file protection function.
File lock can be set automatically according to the role of the resource through the auto_file_lock option in the nodes section of the resource, or can be manually activated or deactivated through the fsradm lock or unlock command.
Auto Lock
The auto_file_lock option is enabled by default. When a resource's role is demoted, the files are locked by default. To unlock locked files, you need to promote the role of the resource or unlock it via the unlock command.
Locking is automatic, but unlocking is not.
Manual Lock
You can also manually operate file locking by disabling the auto_file_lock option. To operate file lock manually, you must separately execute the lock command and the demote command as follows and follow the command sequence.
...
FileLock
Files copied to the target must be protected from write I/O other than the mirroring data received from the source. Otherwise, data consistency to maintain a duplicate copy is not guaranteed. In particular, when operating HA, the secondary file lock must be activated to protect data.
File lock is generally activated in the secondary and deactivated in the primary depending on the role of the resource to operate as a target file protection function.
File lock can be set automatically according to the role of the resource through the auto_file_lock option in the nodes section of the resource, or can be manually activated or deactivated through the fsradm lock or unlock command.
Auto Lock
The auto_file_lock option is enabled by default. When a resource's role is demoted, the files are locked by default. To unlock locked files, you need to promote the role of the resource or unlock it via the unlock command.
Locking is automatic, but unlocking is not.
Manual Lock
You can also manually operate file locking by disabling the auto_file_lock option. To operate file lock manually, you must separately execute the lock command and the demote command as follows and follow the command sequence.
Code Block |
---|
c:\>fsradm lock r0
done
c:\>fsradm secondary r0
done |
If the -l option is specified, the above two commands can be processed as one demotion command. The order of commands is the same as above, locking first and then demoting.
Code Block |
---|
c:\>fsradm secondary -l r0
done |
Conversely, during the promotion process, the lock is released after the primary command.
Code Block |
---|
c:\>fsradm primary r0 done c:\>fsradm secondaryunlock r0 done |
If It can be processed in a single promote command using the -l option is specified, the above two commands can be processed as one demotion command. The order of commands is the same as above, locking first and then demoting.u option.
Code Block |
---|
c:\>fsradm secondaryprimary -lu r0 done |
Conversely, during the promotion process, the lock is released after the primary command.
Code Block |
---|
c:\>fsradm primary r0
done
c:\>fsradm unlock r0
done |
It can be processed in a single promote command using the -u option.
Code Block |
---|
c:\>fsradm primary -u r0
done |
Info |
---|
Info |
|
...
Info |
---|
|
Switchover
A switchover is the manual exchange of access to resources from one system to another within a replication cluster. It is the process of demoting a source node and promoting a target node to the source node role to enable data for a service. Also known as manual switchover, the opposite of this is failover, which is an automatic response to a failure.
Demote the resource on the source node.
Code Block |
---|
c:\>fsradm secondary r0
done |
Promote the target node's resource.
Code Block |
---|
c:\>fsradm primary r0
done |
If the promotion is successful, the transfer is considered complete.
Info | ||
---|---|---|
| ||
|
Persist Role
Resource roles can be changed based on operational circumstances, but sometimes you may want to keep a role persistent. (FSR 1.2.4 and later)
A resource with persist-role set will continue to have the resource role explicitly specified(with the fsradm command) at the time of restart. This works in any situation where the replication service or system reboots, causing the resource to restart.
Code Block |
---|
{
...
"options": {
"persist-role": true,
...
}
} |
One-way Replications
If you always want only one-way replication/backup from the primary to the secondary node, without switching over, consider the target-only attribute on the standby node side. (FSR 1.2.4 and later)
- Set the persist-role attribute described above in the resource options section to fix the roles of the primary and secondary nodes.
- Set the target-only attribute on the standby node side to force the replication/synchronization direction from the primary node to the standby node only.
A target-only node is prohibited from having the source role in all replication/sync operations, including explicit commands, and can only have the target role. Any manual synchronization or promotion commands that act as a source role are blocked (but promotion is allowed on replication disconnect).
Code Block |
---|
{
...
"options": {
"persist-role": true,
...
}
"nodes": [
{
"name": "active",
...
},
{
"name": "standby",
"target-only": true
...
}
} |
Info | ||
---|---|---|
| ||
After disconnecting replication
|
Inquiry
Status
The status of the FSR can be queried using the fsradm status command.
...