<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><div><pre><span style='color:black'><o:p>&nbsp;</o:p></span></pre></div><p class=MsoNormal>I used formula from <a href="http://www.exonotes.com/node/74">OCFS2/DRBD/LVM2 Offline Resizing | exonotes</a> 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?). <br><br>The formula: <o:p></o:p></p><p class=MsoNormal>la-size-sect = device_size_in_sectors – md_size_sect<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>where md_size_sect = int((device_size_in_sectors / 32768 + 79)/8)*8<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><pre style='margin-left:.5in'><span style='color:black'>&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<o:p></o:p></span></pre><pre><span style='color:black'><o:p>&nbsp;</o:p></span></pre><p class=MsoNormal>So without using all that formula you just mention, and formula provided in the source above, generally using :<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Filesystem size = total backing block device size (MB) - 1 <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Should work just fine right (I tested it and it works)? <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><pre style='margin-left:.5in'><i><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.<o:p></o:p></span></i></pre><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>But if its in GB/TB, it’s sufficient to use Sgross / 32768 * Cpeer + 1 MiB ?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>For example: <o:p></o:p></p><p class=MsoNormal>I have 1.5 TB LVM with sector size of 512bytes, so<o:p></o:p></p><p class=MsoNormal>1.5 TiB = 1,610,612,736 KiB<o:p></o:p></p><p class=MsoNormal>1,610,612,736 KiB / 512bytes = 3145728 Sectors <o:p></o:p></p><p class=MsoNormal>Snet= 1,610,612,736 KiB - ((3145728 Sectors/32768 * 5 peers) + 1024KiB)<o:p></o:p></p><p class=MsoNormal>Snet= 1,610,612,736 KiB - (480 Sectors + 1024 KiB)<o:p></o:p></p><p class=MsoNormal>Snet= 1,610,612,736 KiB - (240 KiB + 1024 KiB)<o:p></o:p></p><p class=MsoNormal>Snet= 1,610,612,736 KiB – 1,264KiB<o:p></o:p></p><p class=MsoNormal>Snet= 1,610,611,472KiB<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>So I set the filesystem to 1610612256 KiB and <o:p></o:p></p><p class=MsoNormal>backing block device to 1610612736 KiB.<o:p></o:p></p><p class=MsoNormal>Am I in the right path here?<o:p></o:p></p></div></body></html>