[DRBD-user] using drbd on software raid

Lars Ellenberg Lars.Ellenberg at linbit.com
Sun May 30 12:37:53 CEST 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-05-29 19:43:36 -0600
\ Lucas Albers:
> I am attempting to use drbd on top of software raid.
> I have successfully create the raid5 partition.
> I have not put a file system on it.
> I have compiled drbd and loaded module.
> I started drbd with the following commands (see below addresses munged)
> When i attempt to make the file system on /dev/nb0 it gives me the
> following error:
> mkreiserfs: Guessing about desired format..
> mkreiserfs: Kernel 2.4.25 is running.
> reiserfs_create: can not create that small (0 blocks) filesystem
> 
> 
> drbdsetup commands:
> drbdsetup /dev/nb0 disk /dev/md4
> drbdsetup /dev/nb0 primary
> 
> 
> Here is my drbd.conf file:

Hint:

> 
> resource drbd0 {

-   protocol=B
+   protocol=C

> fsckcmd  = fsck -p -y

+ disk {
+   # if the lower level device reports io-error, we panic!
+   # (standby node takes over)
+   # comment this out, if you want to survive this, e.g. you do testing
+   # only, or you have other means to cope with that.
+   do-panic
+
+   # the device size in bytes, default unit is k (1 block == 1024 bytes)
+   # should be the minimum of the sizes of the lower level devices of
+   # the nodes.
+   # (since we often use 4k as logical block size,
+   #  and I see "access beyond end of device" in some rare cases, when
+   #  someone tries to access the last logical block with full block
+   #  size, but it is some sectors shorter -- not drbd's fault, anyways)
+   # it is probably best rounded _down_ to the next multiple of 4
+   disk-size = 12345678k
    ^^^^^^^^^
this being the important missing thing in your configuration file.
if you leave this out, the drbd will only be useable after it first
connected to the peer.

+ }

> on cslabxx {
>      device=/dev/nb0
>      disk=/dev/md4
>      address=153.90.199.xx
>      port=7789
>     }
> 
> on compxx {
>         device=/dev/nb0
>         disk=/dev/md3
>         address=153.90.199.xx
>         port=7789
>   }
>  }

> All the documentation appears to indicate this is the order to use when
> creating drbd on software raid:
> create raid.
> create drbd on top of raid

connect drbd peers

> make file system on drbd.


hth,
	Lars Ellenberg



More information about the drbd-user mailing list