<div class="gmail_quote">2009/3/27 Trinh, Hung <span dir="ltr"><<a href="mailto:HTrinh@crossbeamsys.com">HTrinh@crossbeamsys.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Hello list,</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I’m running DRBD 8.2.5 on a couple of 64bit SMP PCs with CentOs 5.1.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">The PCs have one DRBD partition on /dev/sda3 and was completely synced.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">PC1 is Primary and PC2 is Secondary.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">After they were synced, I brought down the drbd device on PC2. </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">On PC2 (secondary node):</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I ran fsck and mounted the /dev/sda3 to make sure the files look good. </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I changed the content of 1 file, umount the /dev/sda3 and brought the drbd device up.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">The /proc/drbd on both PCs showed both nodes’s ds are up-to-date.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I then brought down drbd on PC2 (secondary node), did fsck on /dev/sda3 and mounted</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">The file I modified did not get updated to match with the Primary node, PC1.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">My questions:</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">1. Is this a correct behavior?</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></span></font></p></div></div></blockquote>
<div>Yes, it is. This is how DRBD is implemented - it is a kernel module that acts as a block-device driver. If you omit it when modifying the data, it has no way to recognise the modifications and propagate them.</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><span id=""></span>2. If so, how can I fix it without going through a full sync?</span></font></p></div></div></blockquote>
<div>DRBD 8.2.7+ implement verify algorithm - compare device blocks using hash algorithms. It executes the out-of-date handler if it finds blocks that "look" differently between nodes. After that you can just reconnect secondary device, resync should start automatically.</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><span id=""></span></span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">3. If so, is there a way to vadilate the integrity of DRBD devices?</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">4. If not, is this a bug? or I did something wrong?</span></font></p></div></div></blockquote>
<div>You should not modify backing device directly, you should never modify backing device on secondary node. I'm not sure if verify algorithm can fix 100% of manually created inconsistencies.</div>
<div> </div>
<div>Regards.</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><span id=""></span></span></font><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Thanks for any help.</span></font></p>
<p><font face="Courier New" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> </span></font></p>
<p><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">- Hung</span></font></p>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div></div><br>_______________________________________________<br>drbd-user mailing list<br><a href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br><br></blockquote></div><br>