[DRBD-user] drbd for ramdisk

witalij wp at ypsilon.net
Thu Aug 28 16:52:19 CEST 2008

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


Leroy van Logchem wrote:
>
>> lab:~# drbdadm create-md mirror
>> open(/dev/ram0) failed: Invalid argument
>
> Reproduced your setup here with strace output:
>
> <snip>
> [pid  9884] 13:30:23.673121 munmap(0xb7fb5000, 4096) = 0
> [pid  9884] 13:30:23.673265 open("/dev/ram0", 
> O_RDWR|O_DIRECT|O_LARGEFILE) = -1 EINVAL (Invalid argument)
> [pid  9884] 13:30:23.673451 write(2, "open(/dev/ram0) failed: Invalid 
> "..., 41open(/dev/ram0) failed: Invalid argument
> ) = 41
> [pid  9884] 13:30:23.673636 exit_group(20) = ?
> Process 9884 detached
> 13:30:23.679505 <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
> 13:30:23.683280 --- SIGCHLD (Child exited) @ 0 (0) ---
> 13:30:23.683436 alarm(600)              = 0
> <snip>
>
> A working alternative would be:
>
> dd if=/dev/zero of=/dev/shm/50MBdisk.bin bs=512 count=100K
> losetup /dev/loop0 /dev/shm/50MBdisk.bin
>
> The above needs to be done on both nodes, next only on the primary:
>
> drbdadm create-md mirror
> drbdsetup /dev/drbd0 primary -o
> mkfs.ext3 /dev/drbd0
> mount /dev/drbd0 /mnt/
>
>
what is about the performance on loop device ? is not so fast,
it sees like i need one partition table on this device and one partition 
like /dev/ram0p1
but i have problem to create it



More information about the drbd-user mailing list