[DRBD-user] problems setting up drbd over ram disk

Or Gerlitz ogerlitz at Voltaire.com
Tue Jun 22 11:19:03 CEST 2010

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


Hi Norman and interested drbd users, 

While attempting to create a similar configuration, I came across your Jan 2010 
http://lists.linbit.com/pipermail/drbd-user/2010-January/013417.html post on drbd performance benchmarking over ram disk. I have problems getting the internal metadata going and as being pretty newbiew to drbd might do something wrong:
 
> # drbdadm create-md resram
> Writing meta data...
> initializing activity log
> pwrite(6,...,32768,16740352) in md_initialize_common:AL failed: Input/output error
> Command 'drbdmeta 1 v08 /dev/ram0 internal create-md' terminated with exit code 10

Looking on the strace output of 'drbdmeta 1 v08 /dev/ram0 internal create-md' I see that
a pwrite of 32KB at the pretty end of the device is failing with -EIO. My drbd environment is made of kernel 2.6.35-rc3 and drbd 8.3.8 user space tools. Below is also my config file.

I see that /dev/ram0 is being opened in O_SYNC|O_DIRECT manner, could this be problematic?

Or.

> open("/dev/ram0", O_RDWR|O_SYNC|O_DIRECT) = 4
> fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(1, 0), ...}) = 0
> ioctl(4, BLKSSZGET, 0x7fff04230638)     = 0
> ioctl(4, BLKGETSIZE64, 0x7fff04230578)  = 0
> pread(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096, 16773120) = 4096
> open("/var/lib/drbd/drbd-minor-1.lkbd", O_RDONLY) = -1 ENOENT (No such file or directory)
> pread(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 69632, 0) = 69632
> pread(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096, 16773120) = 4096
> fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb306af6000
> pwrite(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32768, 16740352) = -1 EIO (Input/output error)
> write(2, "pwrite(4,...,32768,16740352) in "..., 83pwrite(4,...,32768,16740352) in md_initialize_common:AL failed: Input/output error
> ) = 83


> global { usage-count yes; }
> 
> common {
>   protocol C;
>   startup { wfc-timeout 0; degr-wfc-timeout 120; }
>   disk    { on-io-error detach; }
>   net {
>     timeout 60;
>     connect-int 10;
>     ping-int 10;
>     max-buffers 2048;
>     max-epoch-size 2048;
>     after-sb-0pri discard-zero-changes;
>     after-sb-1pri discard-secondary;
>     after-sb-2pri disconnect;
>   }
>   syncer  { rate 250M; }
> 
>   meta-disk     internal;
> }
> 
> resource  resram {
>   device        /dev/drbd1;
>   disk          /dev/ram0;
>   on cto-1 {
>         address 192.168.23.157:8888;
>  }
>   on cto-storage {
>         address  192.168.23.90:8888;
>  }
> }




More information about the drbd-user mailing list