[DRBD-user] fdisk /dev/drbd1 -> Unable to open /dev/drbd1

Tomasz Chmielewski mangoo at wpkg.org
Tue Dec 18 12:10:40 CET 2007

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

Do I understand DRBD not correctly?

With it, one can create a RAID-1-like array on remote machines.

So with this config file:

global { usage-count yes; }
common { syncer { rate 10M; } }
resource r0 {
     protocol C;
     net {
         cram-hmac-alg sha1;
         shared-secret "FooFunFactory";
     on san2 {
         device    /dev/drbd1;
         disk      /dev/mapper/san2-swap_1;
         meta-disk  internal;
     on laptok {
         device    /dev/drbd1;
         disk      /dev/sda5;
         meta-disk  internal;

I should create a filesystem on /dev/drbd1, as "disk" contains some drbd 
metadata, right?

Unfortunately, it fails:

# fdisk /dev/drbd1

Unable to open /dev/drbd1

# mkswap /dev/drbd1
/dev/drbd1: Wrong medium type

# mkfs.ext3 /dev/drbd1
mke2fs 1.40-WIP (14-Nov-2006)
mkfs.ext3: Wrong medium type while trying to determine filesystem size

What am I doing wrong?

Tomasz Chmielewski

More information about the drbd-user mailing list