Detaching a problematic node
There's one last thing we need to cover before ending this chapter. If a server is causing problems, there's a good chance that the infrastructure department will want to reclaim, rebuild, or replace it. Simply stopping the broken server is a possible solution, but there is a safer way to decouple DRBD from another system.
In this recipe, we'll quickly cover partially dismantling a running DRBD system without disrupting the active server.
Getting ready
By now, we need the full stack and probably a fully active database server as well. Follow all the recipes up to Tweaking XFS performance before starting here.
How to do it...
For this recipe, we will need two PostgreSQL servers: pg1
and pg2
, where pg1
is the currently active node. Follow these steps as the root
user on the system indicated to permanently remove pg2
from the DRBD cluster:
- Execute this command on both
pg1
andpg2
to disconnect DRBD:drbdadm disconnect pg
- Invalidate the data on the remote...