AnswerBun.com

DRBD Failure: (127) Device minor not allocated

Unix & Linux Asked by Tanatos Daniel on December 14, 2020

I use wmware workstation to run two virtual machines with OpenVZ 2.6.32-042stab108.2 installed on top on CentOS 6.6. I have created another primary partition, /dev/sda4, to configure it as drbd resource. I also created a filsystem on it. The second machine is actually created using the virtual disk of the first one, with changed hostname and eth0 ip address. The drbd configuration file is this:

global { usage-count no; } 
common { syncer { rate 100M; } } 
resource r0 { 
        protocol C; 
        startup { 
                wfc-timeout  15; 
                degr-wfc-timeout 60; 
        } 
        net { 
                cram-hmac-alg sha1; 
                shared-secret "password"; 
        } 
        on primary { 
                device /dev/drbd0; 
                disk /dev/sda4; 
                address 192.168.18.10:7788; 
                meta-disk internal; 
        } 
        on secondary { 
                device /dev/drbd0; 
                disk /dev/sda4; 
                address 192.168.18.20:7788; 
                meta-disk internal; 
        } 
}

After creating the resource with drbdadm create-md r0, when I enter service drbd start, I get:

Failure: (127) Device minor not allocated.

The output of drbdadm dump all might be helpful:

[[email protected] ~]# drbdadm dump all
# /etc/drbd.conf
# resource r0 on primary: not ignored, not stacked
resource r0 {
    protocol               C;
    on primary {
        device           /dev/drbd0 minor 0;
        disk             /dev/sda4;
        address          ipv4 192.168.18.10:7788;
        meta-disk        internal;
    }
    on secondary {
        device           /dev/drbd0 minor 0;
        disk             /dev/sda4;
        address          ipv4 192.168.18.20:7788;
        meta-disk        internal;
    }
    net {
        cram-hmac-alg    sha1;
        shared-secret    danuts;
    }
    startup {
        wfc-timeout       15;
        degr-wfc-timeout  60;
    }
}

What is causing this error and how can it be mitigated? Thanks!

One Answer

I just had the same error , it appeared that IP address for the second node was not reachable. First i checked the service status:

systemctl status drbd.service
â drbd.service - DRBD -- please disable. Unless you are NOT using a cluster manager.
   Loaded: loaded (/usr/lib/systemd/system/drbd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since mar. 2018-04-10 16:21:49 CEST; 5s ago
  Process: 3347 ExecStart=/lib/drbd/drbd start (code=exited, status=20)
 Main PID: 3347 (code=exited, status=20)

avril 10 16:21:49 GROESSLTCL0B systemd[1]: Starting DRBD -- please disable. Unless you are NOT using a cluster manager....
avril 10 16:21:49 GROESSLTCL0B drbd[3347]: Starting DRBD resources: drbd.d/r0.res:20: in resource r0, on GROESSLTCL0B:
avril 10 16:21:49 GROESSLTCL0B drbd[3347]: IP 192.168.254.2 not found on this host.
avril 10 16:21:49 GROESSLTCL0B systemd[1]: drbd.service: main process exited, code=exited, status=20/n/a
avril 10 16:21:49 GROESSLTCL0B systemd[1]: Failed to start DRBD -- please disable. Unless you are NOT using a cluster manager..
avril 10 16:21:49 GROESSLTCL0B systemd[1]: Unit drbd.service entered failed state.
avril 10 16:21:49 GROESSLTCL0B systemd[1]: drbd.service failed.

So i fixed the IP of the second node in r0.res , the new content is as following:

resource r0 {
     protocol "C";

  net {
    allow-two-primaries;
    after-sb-0pri discard-zero-changes;
    after-sb-1pri discard-secondary;
    after-sb-2pri disconnect;
  }
  on GROESSLTCL0A {
    device /dev/drbd0;
    disk /dev/sdb;
    address 163.104.8.108:7789;
    meta-disk internal;
   }

  on GROESSLTCL0B {
    device /dev/drbd0;
    disk /dev/sdb;
    address 163.104.8.107:7789;
    meta-disk internal;
  }

}

Then i recreated the resource:

drbdadm create-md r0

after that i restarted drbd service and all was working as expected.

Answered by Soufas on December 14, 2020

Add your own answers!

Related Questions

Linux on Omnibook 300

1  Asked on December 3, 2020 by tomas-by

     

Auto-mounting external hard drive not working

1  Asked on December 3, 2020 by ppleassassin

         

Firefox temporary files

2  Asked on December 3, 2020 by daniele

   

Full text of commands cut off in /var/log/secure

1  Asked on December 2, 2020 by user3427070

   

how can i use mod_wsgi for apache 2.4.6 in centos 6.10 system

0  Asked on December 1, 2020 by touqir-rasul

   

Missing glyphs with urxvt-unicode

2  Asked on December 1, 2020 by luigi-pertoldi

     

How to upgrade vim only in my own directory?

0  Asked on December 1, 2020 by c-yj

     

cross-compiling for 32-bit architecture on 64-bit (FreeBSD)

1  Asked on November 30, 2020 by sephiroth

   

Environment variable in LXSession autostart file?

2  Asked on November 30, 2020 by paul-d-smith

 

How to trick a program into thinking there is no X server running

2  Asked on November 29, 2020 by luka-aleksi

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP