[DRBD-user] Command 'drbdmeta 0 v08 /dev/sda3 internal create-md' terminated with exit code 40

Lars Ellenberg lars.ellenberg at linbit.com
Wed Jul 30 14:52:59 CEST 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Tue, Jul 22, 2014 at 07:47:10PM +0000, Colom, Jaime wrote:
> Hi Guys,
> 
> I have been trying to setup and configure DRBD in my system in order
> to replicate the information for MySQL. I have followed the
> instructions line by line, but I keep getting the following error the
> moment I try to create the partition for the DRBD:

> Notice that I have created sda3 storage for the DRBD-managed data:

> As per instructions, If your hosts don’t already have an empty
> partition that you plan to use for the DRBD-managed data then that
> must be created first – even before that confirm that you have a disk
> available which hasn’t already been partitioned:
> 
> 
> # fdisk -cu /dev/sda3

Why would you partition sda3, which *is* already a partition?

>      Device Boot      Start         End      Blocks   Id  System
> 
> /dev/sda3p1            2048    40959999    20478976   83  Linux

"nonsense".

> # mkfs.ext4 /dev/sda3

Why do you mkfs on the lower level device?

You want to mkfs on the DRBD.

> # drbdadm create-md clusterdb_res
> md_offset 20971515904
> al_offset 20971483136
> bm_offset 20970840064
> 
> 
> Found ext3 filesystem
>     20480000 kB data area apparently used
>     20479336 kB left usable by current configuration

But yes of course, your mkfs just used the full lower level device,
and DRBD prevented you from shooting yourself.

And still you blame DRBD ;-)

> I have gone over old queries about this same subject, but no one gives
> a detail description on how to solve this. Here is my
> /etc/drbd.d/clusterdb_res.res file.

So the DRBD User's Guide does not mention
to NOT mkfs the lower level device,
but to mkfs on DRBD?  Really?

Please provide a documentation patch to clarify and improve it, then.

> on ha1-srv {
>    device /dev/drbd0;
>    disk /dev/sda3;
>    address   1.1.1.11:7788;
>    flexible-meta-disk internal;
> }

> I will appreciate if you can look at the steps I am following and tell
> me if I am missing something. Let me know if you need more
> information.

You don't partition a partition
(well; unless you know what you are doing, that partition is meant to be
a disk image, and you indend to use kpartx or similar...).
You don't mkfs the lower level device of a DRBD.
You don't mkfs on a component device of a RAID either, do you.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list