[DRBD-user] DRBD over an existing filesystem

Lars Ellenberg Lars.Ellenberg at linbit.com
Thu Mar 25 17:32:51 CET 2004

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

/ 2004-03-25 20:09:41 +0530
\ En Chiang Lee:
> Hi,
> I was trying to mirror an existing ext3 filesystem using drbd to another
> node in an OpenSSI cluster, so I associated /dev/nbd/0 with /dev/hde2.
>   on dlssi3 {
>     device=/dev/nbd/0
>     disk=/dev/hde2
>     address=
>     port=7788
>     meta-disk=internal

>     meta-index=-1
>   }
> With this, I am able to mount the filesystem. However, when I try fsck
> on /dev/nbd/0, I get the following error:
> [root at dlssi3 root]# fsck /dev/nbd/0
> fsck 1.32 (09-Nov-2002)
> e2fsck 1.32 (09-Nov-2002)
> /: recovering journal
> The filesystem size (according to the superblock) is 2560351 blocks
> The physical size of the device is 2527583 blocks
> Either the superblock or the partition table is likely to be corrupt!
> Abort<y>? yes

> (2560351-2527583) * (4K blocks) == 128 M

you pretty likely already corrupted the underlying filesystem
(at least the last 128M of it).

If you want to have "meta-disk=internal",
the right way to go is to create the filesystem on the /dev/nbd/0,
then it will get the right size.

> In the archives, there is mention of using "size=<somesize>", but that
> is deprecated according the the sample drbd.conf. (If I was to use size=
> how would the value be specified? fs blocks? GB?)

the size parameter is in 1K, but also takes M and G as unit modifiers.

> I'm trying this with drbd-0.7_pre5.
> How would I go about using drbd on an existing file system?

You can have the meta data in some other device (not internal), and
adjust the meta-disk and meta-index accordingly.

OR you can resize (shrink) the file system first.
*BEFORE* the last 128M of the device get overwritten with bitmap data.

	Lars Ellenberg

More information about the drbd-user mailing list