Hi all,<br><br><div>I&#39;ve been trying to recompile latest drbd-utils and apparently failed:</div><div><br></div><div>$ autoconf</div><div>$ ./configure --prefix=/usr --without-83support --with-pacemaker<br></div><div><div>./configure: line 1958: PKG_PROG_PKG_CONFIG: command not found<br></div><div>configure: Could not detect systemd unit directory</div><div>Using systemd unit directory:</div><div>configure: Could not detect udev rules directory, using default</div><div>Using udev rules directory: /lib/udev</div><div>checking for gcc... gcc</div><div>checking for C compiler default output file name... a.out</div><div>checking whether the C compiler works... yes</div><div>checking whether we are cross compiling... no</div><div>checking for suffix of executables...</div><div>checking for suffix of object files... o</div><div>checking whether we are using the GNU C compiler... yes</div><div>checking whether gcc accepts -g... yes</div><div>checking for gcc option to accept ISO C89... none needed</div><div>checking whether ln -s works... yes</div><div>checking for sed... /bin/sed</div><div>checking for grep... /bin/grep</div><div>checking for flex... /usr/bin/flex</div><div>checking for rpmbuild... /usr/bin/rpmbuild</div><div>checking for xsltproc... /usr/bin/xsltproc</div><div>checking for tar... /bin/tar</div><div>checking for git... /usr/bin/git</div><div>checking for dpkg-buildpackage... no</div><div>checking for udevadm... /sbin/udevadm</div><div>checking for udevinfo... false</div><div>configure: WARNING: No dpkg-buildpackage found, building Debian packages is disabled.</div><div>checking for /etc/gentoo-release... no</div><div>checking for /etc/redhat-release... yes</div><div>checking for /etc/slackware-version... no</div><div>checking for /etc/debian_version... no</div><div>checking for /etc/SuSE-release... no</div><div>configure: configured for Red Hat (includes Fedora, RHEL, CentOS).</div><div>checking for /etc/fedora-release... no</div><div>configure: creating ./config.status</div><div>config.status: creating Makefile</div><div>config.status: creating user/shared/Makefile</div><div>config.status: creating user/v9/Makefile</div><div>config.status: creating user/v83/Makefile</div><div>config.status: creating user/v84/Makefile</div><div>config.status: creating scripts/Makefile</div><div>config.status: creating documentation/v9/Makefile</div><div>config.status: creating documentation/v83/Makefile</div><div>config.status: creating documentation/v84/Makefile</div><div>config.status: creating scripts/drbd.rules</div><div>config.status: error: cannot find input file: user/shared/<a href="http://config.h.in">config.h.in</a></div></div><div><br></div><div><a href="https://gist.github.com/mente/5707963576be475774aa">config.log</a></div><div><br></div><div>Checked logs - <a href="http://config.h.in">config.h.in</a> was never there. Where can I find it?</div><div><br></div><div>Thanks!</div><div>Alex</div><br><div class="gmail_quote">On Mon Jan 26 2015 at 16:03:53 Alex Vasilenko &lt;<a href="mailto:aa.vasilenko@gmail.com" target="_blank">aa.vasilenko@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Lars,<br><br>Here&#39;s mine <span style="line-height:19.7999992370605px">sectors data:</span><div><span style="line-height:19.7999992370605px"><br></span></div>$ sfdisk -d<br><br>Warning: extended partition does not start at a cylinder boundary.<br>DOS and Linux will interpret the contents differently.<br># partition table of /dev/sda<br>unit: sectors<br><br><br>/dev/sda1 : start=     2048, size= 25165825, Id=83<br>/dev/sda2 : start= 25169920, size=  1048577, Id=83<br>/dev/sda3 : start= 26220544, size=2147483649, Id=83<br>/dev/sda4 : start=2173706240, size=3685736448, Id= f<br>/dev/sda5 : start=2173708288, size=1860173825, Id=83<br>/dev/sda6 : start=4033884160, size=1825558528, Id=83<div><br></div><div>So looks like you&#39;re right. Just 1 sector above your number. </div><div>Will try to compile HEAD drbd. Is it stable enough to be used on production servers?</div><div><br></div><div>Regards,</div><div>Alex</div><div><br><div class="gmail_quote">On Mon Jan 26 2015 at 11:27:18 Lars Ellenberg &lt;<a href="mailto:lars.ellenberg@linbit.com" target="_blank">lars.ellenberg@linbit.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Jan 24, 2015 at 04:01:11PM +0200, Alex Vasilenko wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; Having a strange behavior using drbd 8.4.5. After restart one partition of<br>
<br>
TL;DR: for the fix scroll ahead.<br>
<br>
You should always tell both kernel *and* userland versions.<br>
<br>
<br>
&gt; Jan 24 14:42:39 de kernel: block drbd0: disk( UpToDate -&gt; Failed )<br>
<br>
That may look scary, but is normal: during detach (down),<br>
we move via &quot;Failed&quot; to &quot;Diskless&quot; to avoid various potential races.<br>
<br>
&gt; Now trying to restart backup partition:<br>
&gt;<br>
&gt; &gt; $ sudo drbdadm down backup<br>
&gt; &gt; $ sudo drbdadm up backup<br>
&gt; &gt; strange bm_offset -65608 (expected: -65600)<br>
&gt; &gt; No valid meta data found<br>
&gt; &gt; Command &#39;drbdmeta 1 v08 /dev/sda3 internal apply-al&#39; terminated with exit<br>
&gt; &gt; code 255<br>
<br>
<br>
&gt; Somehow metadata is not there anymore (?!). Note warning saying &quot;strange<br>
&gt; bm_offset -65608 (expected: -65600)&quot;.<br>
&gt; Ok, how about recreate metadata and resync full partition? Trying to wipe<br>
&gt; old metadata shows that metadata is not present. Ok, let&#39;s pretend it&#39;s not<br>
&gt; there:<br>
&gt;<br>
&gt; &gt; $ sudo drbdadm create-md backup<br>
&gt; &gt; strange bm_offset -65608 (expected: -65600)<br>
&gt; &gt; strange bm_offset -65608 (expected: -65600)<br>
&gt; &gt; md_offset 1099511623680<br>
&gt; &gt; al_offset 1099511590912<br>
&gt; &gt; bm_offset 1099478036480<br>
&gt; &gt; Found ext3 filesystem<br>
&gt; &gt;   1073709016 kB data area apparently used<br>
&gt; &gt;   1073709020 kB left usable by current configuration<br>
&gt; &gt; Even though it looks like this would place the new meta data into<br>
&gt; &gt; unused space, you still need to confirm, as this is only a guess.<br>
&gt; &gt; Do you want to proceed?<br>
&gt; &gt; [need to type &#39;yes&#39; to confirm] yes<br>
&gt;<br>
&gt; initializing activity log<br>
&gt; &gt; NOT initializing bitmap<br>
&gt; &gt; Writing meta data...<br>
&gt; &gt; New drbd meta data block successfully created.<br>
&gt; &gt; success<br>
&gt;<br>
&gt;<br>
&gt; Same warning twice<br>
<br>
So what.  During &quot;probing&quot;, some validation is done with various<br>
potential contexts.  But it keeps being &quot;strange&quot;, which is reported.<br>
<br>
&gt; possible wrong fs detection (in fact it&#39;s ext4) and<br>
<br>
ext2, 3, 4, who cares.  for this purpose, keeping you from shooting<br>
yourself by truncating an existing file system, they are the same.<br>
They don&#39;t differ in their &quot;master magic&quot;,<br>
but only in by feature flags, which are irrelevant for us.<br>
<br>
&gt; incorrect data usage detection (in fact takes 533GB of 1Tb partition)<br>
<br>
How much &quot;payload&quot; you stored in the file system is irrelevant,<br>
we care about the size of the file system itself,<br>
and that you won&#39;t truncate it.<br>
<br>
It may well still be completely &quot;empty&quot;, it still would be very unhappy<br>
if you truncated the data area it thinks it owns exclusively.<br>
<br>
&gt; Wiping and creating metadata again fixes bm_offset warning until next drbd<br>
&gt; service restart.<br>
<br>
Yup. The kernel sanity checks are less picky when attaching the first<br>
time, and just fixes the broken offsets drbdmeta put there.<br>
<br>
&gt; Having latest Centos 6.5. Kernel 2.6.32-504.1.3.el6.x86_64<br>
&gt; Disks are based on hardware RAID 1.<br>
&gt;<br>
&gt; $ sudo fdisk -l<br>
<br>
Next time use &quot;sfdisk -d&quot; (to get the exact sectors,<br>
not some rounded last-millenium cylinder numbers),<br>
or better yet, show &quot;blockdev --getsize64 /dev/X&quot;<br>
<br>
&gt; backup uses /dev/sda3 and main uses /dev/sda6<br>
<br>
&gt; Can someone hint me what&#39;s wrong am I doing? Will provide any additional<br>
&gt; info on request.<br>
<br>
The fix:<br>
<a href="http://git.linbit.com/gitweb.cgi?p=drbd-utils.git;a=commit;h=7969b9dc6636b5543d16b7b09ae267abc64ca111" target="_blank">http://git.linbit.com/gitweb.<u></u>c<u></u><u></u>gi?p=drbd-utils.git;a=commit;<u></u>h<u></u><u></u>=<u></u>7969b9dc6636b5543d16b7b09ae26<u></u><u></u>7<u></u>abc64ca111</a><br>
| drbdmeta: fix regression corner cases in bitmap size calculation<br>
|<br>
| Regression was introduced with the kernel/userland split.<br>
| Regression was caused underestimating the number of bytes by<br>
| not aligning the number of bits to 64 before converting to bytes<br>
| (dividing by 8).<br>
<br>
Apparently, your sda3 just happens to be of some &quot;odd&quot; size,<br>
just above 2147483648 sectors, (hex: 0x80000000).<br>
(if it was exactly that, you would not have triggered the bug).<br>
<br>
<br>
--<br>
: Lars Ellenberg<br>
: <a href="http://www.LINBIT.com" target="_blank">http://www.LINBIT.com</a> | Your Way to High Availability<br>
: DRBD, Linux-HA  and  Pacemaker support and consulting<br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
__<br>
please don&#39;t Cc me, but send to list   --   I&#39;m subscribed<br>
______________________________<u></u><u></u><u></u>_________________<br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" target="_blank">http://lists.linbit.com/<u></u>mailma<u></u><u></u>n/listinfo/drbd-user</a><br>
</blockquote></div></div></blockquote></div>