[ClusterLabs] Best DRBD Setup

Ken Gaillot kgaillot at redhat.com
Wed Apr 26 15:26:57 EDT 2023


On Wed, 2023-04-26 at 21:12 +0200, Brian Jenkins wrote:
> Hi all
> 
> I’ve been working on my home cluster setup for a while now and tried
> varying setups for DRBD resources and finally settled on one that I
> think is the best but I’m still not completely satisfied with the
> results. Biggest question is, did I set this up in the best way? Any
> advice would be appreciated. I have multiple servers setup in groups
> and the DRBDs are in separate clones like below. I added constraints
> to hopefully ensure things work together well. If you have any
> questions to clarify my setup let me know.
> 
> 
>    * Resource Group: git-server:
>     * gitea-mount       (ocf:heartbeat:Filesystem):      Started
> node1
>     * git-ip    (ocf:heartbeat:IPaddr2):         Started node1
>     * gitea     (systemd:gitea):         Started node1
>     * backup-gitea      (systemd:backupgitea.timer):     Started
> node1
>   * Resource Group: pihole-server:
>     * pihole-mount      (ocf:heartbeat:Filesystem):      Started
> node2
>     * pihole-ip (ocf:heartbeat:IPaddr2):         Started node2
>     * pihole-ftl        (systemd:pihole-FTL):    Started node2
>     * pihole-web        (systemd:lighttpd):      Started node2
>     * pihole-cron       (ocf:heartbeat:symlink):         Started
> node2
>     * pihole-backup     (systemd:backupDRBD at pihole.timer):      
> Started node2
>   * Clone Set: drbd-gitea-clone [drbd-gitea] (promotable):
>     * Promoted: [ node1 ]
>     * Unpromoted: [ node2 node3 node4 node5 ]
>   * Clone Set: drbd-pihole-clone [drbd-pihole] (promotable):
>     * Promoted: [ node2 ]
>     * Unpromoted: [ node1 node3 node4 node5 ]
> 
>  Ordering Constraints:
>   start drbd-gitea-clone then start gitea-mount (kind:Mandatory)
>   start drbd-pihole-clone then start pihole-mount (kind:Mandatory)

You want promote then start; with this, the mounts can start before
DRBD is promoted. It's best practice to refer to the group in
constraints rather than a member, but it shouldn't be a problem.

> 
>  Colocation Constraints:
>   pihole-server with drbd-pihole-clone (score:INFINITY) (rsc-
> role:Started) (with-rsc-role:Promoted)
>   git-server with drbd-gitea-clone (score:INFINITY) (rsc-
> role:Started) (with-rsc-role:Promoted)
> 
>  My setup is on five raspberry pis running ubuntu server 22.10 with:
> pacemaker 2.1.4-2ubuntu1
> pcs 0.11.3-1ubuntu1
> drbd 9.2.2-1ppa1~jammy1
> 
>  Overall the setup works but it seems quite fragile. I suffer from
> lots of fencing whenever I reboot a server and it doesn’t want to
> restart correctly. Another thing I have noticed is that it will
> sometimes take as long as 10-12 minutes to mount one of the DRBD
> filesystems (XFS) so I have extended the start timeout for each *-
> mount to 15 minutes.
> 
> Thanks in advance for any advice to improve the setup.
> 
> Brian
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list