大网数据广告活动
服务器运维问答

DRBD - no resources defined

· 52CE 我爱测

I have some problems getting a drbd cluster running. When I want to start creating my storage, i get the following error: root@raspberrypi-ha1~# drbdadm create-md drbd1 no resources defined But my resource is definitely defined i…

问题原文

原帖链接 · Matzes · CC BY-SA 3.0

I have some problems getting a drbd cluster running.

When I want to start creating my storage, i get the following error:

root@raspberrypi-ha1~# drbdadm create-md drbd1
no resources defined

But my resource is definitely defined in /etc/drbd.conf on both hosts:

include "drbd.d/global_common.conf";
include "drbd.d/*.res";

resource drbd1{
        protocol C;

        syncer {
        rate 3M;
        al-extents 257;
}
on raspberrypi-ha1 {
    device    /dev/drbd1;
    disk      /dev/sda1;
    address   192.168.178.201:7789;
    meta-disk internal;
  }
  on raspberrypi-ha2 {
    device    /dev/drbd1;
    disk      /dev/sda1;
    address   192.168.178.202:7789;
    meta-disk internal;
  }

}

The hostname is set to raspberrypi-ha1 Does anyone have an idea?

社区高分解答

原帖链接 · Wesley Gill · CC BY-SA 3.0

I had the same issue. The fix is quite simple actually. Typically this happens when you update your drbdutils package to version 8.9.6. The configuration file is now in /usr/local/etc/drbd.conf NOT /etc/drbd.conf

Typically the /usr/local/etc/drbd.conf just says to include the file /usr/local/etc/drbd.d/global_common.conf and /usr/local/etc/drbd.d/*.res

So all you need to do is move your config files to the new location. I would remove /etc/drbd.conf and /etc/drbd.d to avoid confusion in the future.

Another very useful command and the one I used to determine the problem is:

drbdadm dump --config-to-test=/dev/null

which dumps the configuration as is.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。