DRBD High Availability Useful Commands

This command is used to change roles between high-availability servers. If all is well, a confirmation question should appear if we wish to execute the action. The bascul command permanently moves services from one server to another. If you want to return the services to the main server you must execute the command again.

This command shows the status of the current server.

This command is used to poll all resources even if the status is unknown.

This command stops the server node where it is running. The node status is stopped.

root@debian:~# pcs node unstandby host

In some cases, the bascul command does not finish tilting, which causes one of the servers to be on standby (stopped), with this command the state is restored to normal.

This command removes the resource so it can be created.

This command creates the resource.

root@debian:~# corosync-cfgtool -s

This command is used to check whether cluster communication is happy.

root@debian:~# ps axf

This command confirms that Corosync is functional, we can check the rest of the stack. The pacemaker has already been started, so verify the necessary processes are running.

This command allows you to check the pcs status output.

This command allows you to check the validity of the configuration.

This command shows the integrity status of the disks that are being shared between both servers in high availability. If for some reason the status of Connecting or Standalone returns to us, wait a while and if the state remains it is because there are synchronization problems between both servers, and you should execute the drbdsplit command.

This command shows you the state of your device is kept in /proc/drbd.

This command shows you the status on the other node (the split brain survivor), if its connection state is also StandAlone, you will need to enter.

This command is another way to check the role of the block device.

This command allows you to switch the DRBD block device to Primary using drbdadm.

This command allows you to switch the DRBD block device to Secondary using drbdadm.

This script creates the cluster automatically.

This script will completely destroy the cluster, leaving the DRBD intact.

This script recreates the cluster starting from the fact that the DRBD is already configured on both servers.

What are your feelings
Updated on December 16, 2023