Recital

Login Register

HOWTO: DRBD (drbdadm create-md fails)

If when your attempt to create device meta-data fails this is drbd preventing you from corrupting a file system present on the target partition.

$ drbdadm create-md drbd0

v08 Magic number not found
md_offset 30005817344
al_offset 30005784576
bm_offset 30004867072

Found ext2 filesystem which uses 190804004 kB
current configuration leaves usable 29301628 kB

Device size would be truncated, which
would corrupt data and result in
'access beyond end of device' errors.
You need to either
* use external meta data (recommended)
* shrink that filesystem first
* zero out the device (destroy the filesystem)
Operation refused.

Command 'drbdmeta /dev/drbd0 v08 /dev/sda4 internal create-md' terminated with exit code 40
drbdadm aborting

Once you have confirmed that the file system present on the target partition is no longer required at the prompt type the following:

Replace /dev/sdaX with the block device you are targeting.

dd if=/dev/zero of=/dev/sdaX bs=1M count=128

Once this has completed the drbdadm create-md drbd0 command will complete with a "success."

$ drbdadm create-md drbd0
v08 Magic number not found
v07 Magic number not found
v07 Magic number not found
v08 Magic number not found
Writing meta data...
initialising activity log
NOT initialized bitmap
New drbd meta data block successfully created.
success
$

 

Twitter

Copyright © 2024 Recital Software Inc.

Login

Register

User Registration
or Cancel