<div>Hello,</div>
<div> </div>
<div>I try to shrink a drbd device online. The documentation says:</div>
<div> </div>
<div>"To shrink DRBD on-line, issue the following command <span class="emphasis"><em>after</em></span> you have shrunk the file system residing on top of it:</div>
<div><pre class="programlisting"># drbdadm resize --size=<new-size> <resource></pre>
<p>You may use the usual multiplier suffixes for <span class="emphasis"><em><new-size></em></span> (K, M, G etc.). After you have shrunk DRBD, you may also shrink the containing block device (if it supports shrinking)."</p>
<p> cat /proc/drbd<br>version: 8.4.1 (api:1/proto:86-100)<br>GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by <a href="mailto:root@somehost">root@somehost</a>, 2012-03-18 09:32:17</p>
<p><snip><br> 2: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----<br> ns:0 nr:0 dw:0 dr:3588 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0<br><snip></p>
<p> drbdadm -V<br>DRBDADM_BUILDTAG=GIT-hash:\ 91b4c048c1a0e06777b5f65d312b38d47abaea80\ build\ by\ <a href="mailto:root@somehost\,\">root@somehost\,\</a> 2012-03-18\ 09:32:08<br>DRBDADM_API_VERSION=1<br>DRBD_KERNEL_VERSION_CODE=0x080401<br>
DRBDADM_VERSION_CODE=0x080401<br>DRBDADM_VERSION=8.4.1</p>
<p> fdisk -l /dev/drbd2</p>
<p>Disk /dev/drbd2: 78.4 GB, 78380724224 bytes<br>255 heads, 63 sectors/track, 9529 cylinders<br>Units = cylinders of 16065 * 512 = 8225280 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes<br>
Disk identifier: 0xa97119f5</p>
<p> Device Boot Start End Blocks Id System<br></p>
<p>No partitions at all, no filesystem either, as this is just a test for the real resize of a live system.</p>
<p>The problem:</p>
<p># drbdadm resize --size=60G r2<br>drbdadm: unrecognized option '--size'<br>try 'drbdadm help resize'<br><br>'drbdadm help resize' doesn't mention --size as possible option</p>
<p>I'd like to know how can I shrink my drbd device.<br><br>Thanks for your help.</p></div>