[DRBD-user] Re: loop device and eth0 loop-back + latest version

Nuno Tavares nunotavares at hotmail.com
Wed Apr 21 05:48:55 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.


Hello again!

I've followed the instructions below (based on an earlier post from 
Michael Hoennig), and everything went ok. 
Now for the test:
# dd if=/dev/zero of=/tmp/drbd_0/zero count=10

1. Nothing arrives at /tmp/drbd_1/
   Does anyone confirms if this works?
2. It seems that drbd_1 is mounted read-only. I need it to be RW. 
   Is it possible?
3. # drbdsetup /dev/nb0 replicate
   "replicate is not a command"
   What? :)

This is the output for 'cat /proc/drbd' after a few tries:
version: 0.7-pre6 (api:72/proto:72)
 
 0: cs:Connected st:Primary/Secondary ld:Consistent
    ns:8292 nr:0 dw:0 dr:8192 al:2 bm:2 lo:0 pe:0 ua:0
 1: cs:Connected st:Secondary/Primary ld:Consistent
    ns:0 nr:8292 dw:8292 dr:0 al:0 bm:2 lo:0 pe:0 ua:0
----
Just wondering, this file would have an equivalent in the secondary 
node, right?
Doesn't it get screwed up by using loopbacks?

The documentation is pretty outdated, I'll try to help here whenever 
I understand a bit of what it's going on here. Have you ever 
considered installing a wiki?

-- 
This is what I've done:
dd if=/dev/zero of=/mnt/d/backup/drbd_0 bs=1024 count=8192
dd if=/dev/zero of=/mnt/d/backup/drbd_1 bs=1024 count=8192
dd if=/dev/zero of=/mnt/d/backup/drbd_metadata bs=1024 count=262144

losetup /dev/loop0 /mnt/d/backup/drbd_0
losetup /dev/loop1 /mnt/d/backup/drbd_1
losetup /dev/loop2 /mnt/d/backup/drbd_metadata

insmod drbd disable_io_hints=1

#mknod /dev/nb0 b 43 0
#mknod /dev/nb1 b 43 1

echo "drbdsetup /dev/nb0"
drbdsetup /dev/nb0 disk /dev/loop0 /dev/loop2 0
drbdsetup /dev/nb0 net 127.0.0.1:9000 127.0.0.1:9001 C
drbdsetup /dev/nb0 primary

echo "mkfs"
mkfs -t ext2 -b 4096 /dev/nb0

echo "drbdsetup /dev/nb1"
drbdsetup /dev/nb1 disk /dev/loop1 /dev/loop2 1
drbdsetup /dev/nb1 net 127.0.0.1:9001 127.0.0.1:9000 C
drbdsetup /dev/nb1 secondary

####echo "replicate"
####drbdsetup /dev/nb0 replicate

#mkdir /tmp/drbd_0
#mkdir /tmp/drbd_1

echo "mount nb0"
mount -t ext2 /dev/nb0 /tmp/drbd_0

echo "mount nb1"
mount -t ext2 /dev/nb1 /tmp/drbd_1


-
Nuno Tavares
http://nthq.cjb.net/





More information about the drbd-user mailing list