<html><head><style><!--#x55518dd941c44b9896ea8bc4950bc1b2 p.MsoNormal
{margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;}
#x55518dd941c44b9896ea8bc4950bc1b2 pre
{margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";}
--></style>

<style id="css_styles">  
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] {  list-style-position: inside;}
body { font-family: Segoe UI; font-size: 12pt;   } 
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
  </style>
</head>
<body><div id="x55518dd941c44b9896ea8bc4950bc1b2" style="tab-interval:.5in;word-wrap:break-word">

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><span>I used formula from </span><a href="http://www.exonotes.com/node/74" style="font-size: 11pt;">http://www.exonotes.com/node/74</a><span>
to calculate md_size_sect and la-sect-size then compare it to md_size_sect
given by create-md after shrinking the volume, and it’s different (because it
doesn’t account for max-peers I assume?). </span></p><p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">
<br />
The formula: <o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">la-size-sect = device_size_in_sectors –
md_size_sect<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">where md_size_sect =
int((device_size_in_sectors / 32768 + 79)/8)*8<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"><br /></o:p></p><p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p><span style="color: rgb(255, 255, 255); font-family: &quot;Courier New&quot;; font-size: 10pt;">&gt;Either resize your filesystem to 179M, resize the LV to 180M, and then after everything is working again, you can resize the filesystem to take all available space, and it should increase to 184252kB or 179.9+ MB</span></p><pre xmlns="http://www.w3.org/TR/REC-html40"><span style="color: black;"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></span></pre>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">So without using all that formula you
just mention, and formula provided in the source above, generally using :<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Filesystem size = total backing block
device size (MB) - 1 <o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Should work just fine right (I tested it
and it works)? <o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p><p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><i style="font-family: &quot;Courier New&quot;; font-size: 10pt;"><span style="color: black;">&gt;For practical purposes, it’s normally sufficient to calculate Sgross / 32768 * Cpeer + 1 MiB. So you’re basically making the device too large (or the filesystem too small), that way you end up with a bit more space for the meta data than what you actually need. That is also what is documented in the DRBD User’s Guide.</span></i></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">But if its in GB/TB, it’s sufficient to
use Sgross / 32768 * Cpeer + 1 MiB ?<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">For example: <o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">I have 1.5 TB LVM with sector size of
512bytes, so<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">1.5 TiB = 1,610,612,736 KiB<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">1,610,612,736 KiB / 512bytes = 3145728
Sectors <o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Snet= 1,610,612,736 KiB - ((3145728
Sectors/32768 * 5 peers) + 1024KiB)<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Snet= 1,610,612,736 KiB - (480 Sectors +
1024 KiB)<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Snet= 1,610,612,736 KiB - (240 KiB + 1024
KiB)<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Snet= 1,610,612,736 KiB – 1,264KiB<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">Snet= 1,610,611,472KiB<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40"><o:p xmlns:o="urn:schemas-microsoft-com:office:office"> </o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">So I set the filesystem to 1610612256 KiB
and <o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<p class="MsoNormal" xmlns="http://www.w3.org/TR/REC-html40">backing block device to 1610612736 KiB.<o:p xmlns:o="urn:schemas-microsoft-com:office:office"></o:p></p>

<span style="font-size:11pt;font-family:'Calibri',sans-serif;mso-fareast-font-family:'Times New Roman';mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;" xmlns="http://www.w3.org/TR/REC-html40">Am I in the right path
here?</span></div>
</body></html>