<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi list,</p>
    <p>I have an LVM backed DRBD resource for a libvirt VM that I wish
      to reduce in size however neither lvresize nor resize2fs are
      working for me.</p>
    <p>backing device for the volume is <b>/dev/trk-kvm-02-vg/blmail</b>
      and is currently 300G and I want to bring it down to 30G.  My
      intended use for this server has changed.<br>
    </p>
    <blockquote>
      <p><tt>root@trk-kvm-02:~/scripts# lvs</tt><tt><br>
        </tt><tt>  LV                VG            Attr       LSize  
          Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert</tt><tt><br>
        </tt><tt>  [...]</tt><tt><br>
        </tt><tt>  blmail            trk-kvm-02-vg -wi-a----- 300.00g </tt><tt><br>
        </tt><tt>  [...]</tt></p>
    </blockquote>
    <p>I bring down the resource and try lvresize on
      /dev/trk-kvm-02-vg/blmail:<br>
    </p>
    <div class="moz-signature">
      <blockquote><tt>root@trk-kvm-02:~/scripts# lvreduce --resizefs -L
          30G /dev/trk-kvm-02-vg/blmail</tt><br>
        <tt>fsck from util-linux 2.27.1</tt><br>
        <tt>fsadm: Filesystem "drbd" on device
          "/dev/mapper/trk--kvm--02--vg-blmail" is not supported by this
          tool</tt><br>
        <tt>  fsadm failed: 1</tt><br>
        <tt>  Filesystem resize failed.</tt><br>
      </blockquote>
      So I thought I'd use a hammer and resize the file system and dd it
      onto a new smaller LVM volume and recreate new drbd meta-data if
      needed:<br>
      <blockquote><tt>root@trk-kvm-02:~/scripts# resize2fs
          /dev/trk-kvm-02-vg/blmail 30G</tt><br>
        <tt>resize2fs 1.42.13 (17-May-2015)</tt><br>
        <tt>resize2fs: Bad magic number in super-block while trying to
          open /dev/trk-kvm-02-vg/blmail</tt><br>
        <tt>Couldn't find valid filesystem superblock.</tt><br>
      </blockquote>
      I would seem to be barking up the wrong tree.  Can anyone point me
      in the right direction for documentation or suggest what is the
      right approach to reducing this volume?<br>
      <br>
      please and thanks<br>
      <br>
      -- <br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <title></title>
      <p><b>Paul O'Rorke</b><br>
        <b>Tracker Software Products (Canada) Limited </b><br>
        <a href="http://www.tracker-software.com/">www.tracker-software.com</a><br>
        Tel:
        +1 (250) 324 1621<br>
        Fax: +1 (250) 324 1623<br>
        <br>
        <a href="http://www.tracker-software.com/"> <img
src="https://www.tracker-software.com/fckfiles/image/images/resellers/logo/TrackerSofwareProducts_Logo_330x100.png"
            name="image.png" border="0" align="bottom" width="330"
            height="100">
        </a>
        <br>
        <br>
        Support:
        <br>
        <a href="http://www.tracker-software.com/support">http://www.tracker-software.com/support
        </a><br>
        Download latest Releases
        <br>
        <a href="http://www.tracker-software.com/downloads/">http://www.tracker-software.com/downloads/</a></p>
      <p><br>
        <br>
      </p>
      <p style="margin-bottom: 0cm; line-height: 100%"><br>
      </p>
    </div>
  </body>
</html>