<table width=100% dir="ltr"><tr><td><DIV id=wrteplaceholder name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">Please note that drbd creates virtual disk devices above the actual disk partition. For example, you can have /dev/nb0 above /dev/hda2 and /dev/nb1 above /dev/hda3 and so on.</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">Your file systems are created on the virtual device and any data on the disk you access normally is through the virtual device. This way, drbd gets to intervene in these operations and synchronize the secondary node with writes you make to these partitions.</DIV>
<DIV name="wrteplaceholder"><BR>Here's an example how to setup a new drbd partition (assuming your configuration file, drbd.conf is ok):</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder">mkdir -p /var/lib/drbd"</DIV>
<DIV name="wrteplaceholder">/etc/rc.d/init.d/drbd start</DIV>
<DIV name="wrteplaceholder">drbdsetup /dev/nb0 primary (this makes sure you can access /dev/nb0)</DIV>
<DIV name="wrteplaceholder">mkfs -b 4096 /dev/nb0</DIV>
<DIV name="wrteplaceholder">tune2fs -j -c0 -i0 /dev/nb0</DIV>
<DIV name="wrteplaceholder">echo "/dev/nb0 /mnt/disk ext3 noauto,data=journal 0 0" >> /etc/fstab (Udate fstab accordingly)</DIV>
<DIV name="wrteplaceholder">mkdir -p /mnt/disk</DIV>
<DIV name="wrteplaceholder">/etc/ha.d/resource.d/datadisk drbd0 start</DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder"> </DIV>
<DIV name="wrteplaceholder"><BR> </DIV>
<DIV name="wrteplaceholder">
<TABLE style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px outset; BORDER-BOTTOM: 1px outset" cellSpacing=0 cellPadding=0 width="100%" bgColor=#f0f0f0>
<TBODY>
<TR>
<TD><FONT size=2><B><aleks.n@telus.net></B><BR>[DRBD-user] drbd.conf</FONT></TD></TR></TBODY></TABLE></DIV>
<DIV name="wrteplaceholder"><PRE dir=ltr>Hi ,
<BR>
<BR>I am struggling to understand how drbd works .....
<BR>
<BR>In drbd.conf , what is the relationship between device=/dev/nbd/0
<BR>and disk=/dev/hda2 ( my root partition ) ?
<BR>
<BR>I loaded the module ..... insmod nbd .... then /dev/nbd/0 shows up in
<BR>my filesystem ....
<BR>I run /etc/init.d/drbd start which does not show any output ( should
<BR>there be ? ) ...
<BR>Then I try mkfs -t ext3 /dev/nbd/0 ..... which fails ( I forget the
<BR>exact error messages , I'll repost
<BR>if that's important ) .
<BR>
<BR>in /etc/fstab I put ..... /dev/nbd/0 / ext3
<BR>........ etc. Does this make sense ?
<BR>I get on boot ......... EXT3-fs : unable to read superblock
<BR>mount : wrong fs type , bad option , bad superblock on /dev/nbd/0 or too
<BR>many mounted
<BR>file systems .
<BR>
<BR>
<BR>_______________________________________________
<BR>drbd-user mailing list
<BR>drbd-user@lists.linbit.com
<BR><A href="http://lists.linbit.com/mailman/listinfo/drbd-user">http://lists.linbit.com/mailman/listinfo/drbd-user</A></PRE></DIV>
<DIV name="wrteplaceholder">
<HR noShade SIZE=1>
</DIV>
<DIV name="wrteplaceholder"><BR><BR></DIV>
<DIV name="wrteplaceholder">
<HR SIZE=1>
</DIV></td></tr></table>
<br>
<hr size=1 noshade>
Walla! Mail, Get Your Private, Free E-mail from Walla! at:<br>
<a href="http://mail.walla.co.il">http://mail.walla.co.il</a><br>