<div dir="ltr"><h3><span class="">H<span style="font-weight:normal">i,</span></span></h3><div><span class=""><span style="font-weight:normal"><br></span></span></div><div><span class=""><span style="font-weight:normal">I read this article and found that we can expand the VM disk online but it doesn&#39;t expand the filesystem of the VM.....</span></span></div>
<div><span class=""><span style="font-weight:normal"><br></span></span></div><div><span class=""><span style="font-weight:normal">I tried the following but still it didn&#39;t work..all the below commands failed on the host..</span></span></div>
<div><span class=""><span style="font-weight:normal"><br></span></span></div><div>I am using :- </div><div>1. Ovirt 3.4.3</div><div>2. Glusterfs 3.5</div><div><br></div><div><a href="https://inthecloud.readthedocs.org/zh_CN/latest/index.html" style="font-family:Calibri,sans-serif;font-size:12pt">https://inthecloud.readthedocs.org/zh_CN/latest/index.html</a><font face="Calibri, sans-serif" size="3"> it&#39;s in Chinese but can translate here :- <a href="http://translate.google.com.hk/translate?hl=en&amp;sl=zh-CN&amp;u=https://inthecloud.readthedocs.org/&amp;prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789">http://translate.google.com.hk/translate?hl=en&amp;sl=zh-CN&amp;u=https://inthecloud.readthedocs.org/&amp;prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789</a></font><br>
</div><h3><span class=""><br></span></h3><h3><span class="">Virtual Machine File System expansion <a class="" href="https://translate.googleusercontent.com/translate_c?depth=1&amp;hl=en&amp;prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789&amp;rurl=translate.google.com.hk&amp;sl=zh-CN&amp;u=https://inthecloud.readthedocs.org/zh_CN/latest/posts/ch03.html&amp;usg=ALkJrhiaix6TlqJPXyUpzoTY1kZriRpW3Q#id11" title="Permanent link to title"></a></span> </h3>
<p> <span class="">
 oVirt 3.4 disks can be online expansion, but for the disk within a file
 system requires a separate support for Linux and Windows lists commonly
 used method in this expansion.</span> </p><p> <span class=""> <strong>Linux file system expansion (libguestfs)</strong></span> </p><blockquote><p> <span class=""> For details, please refer to <a class="" href="https://translate.googleusercontent.com/translate_c?depth=1&amp;hl=en&amp;prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789&amp;rurl=translate.google.com.hk&amp;sl=zh-CN&amp;u=http://libguestfs.org/&amp;usg=ALkJrhhw7qzZZdvvvGYkIoGrDbC9DiD_qw">libguestfs site</a> .</span> </p>
<ol class=""><li> <span class=""> View disk</span> </li></ol><div class=""><div class=""><pre> <span class=""> <span class=""># Virt-filesystem --all --long -h -a hda.img</span></span>
</pre></div></div><ol class="" start="2"><li> <span class=""> Expansion disk copy to be created, while the expansion of 10G (Assuming the original disk size is 10G)</span> </li></ol><p> <span class=""> For RAW format:</span> </p>
<div class=""><div class=""><pre> <span class=""> <span class=""># Truncate -r hda.img hda-new.img</span></span>
<span class=""> <span class=""># Truncate -s + 10G hda-new.img</span></span>
</pre></div></div><p> <span class=""> For QCOW2 and other compressed formats:</span> </p><div class=""><div class=""><pre> <span class=""> <span class=""># Qemu-img create -f qcow2 -o preallocation = metadata hda-new.img 20G</span></span>
</pre></div></div><ol class="" start="3"><li> <span class=""> Extended partition size</span> </li></ol><p> <span class=""> Ordinary extended partition, / boot partition expansion 200M, all the rest to the / partition:</span> </p>
<div class=""><div class=""><pre> <span class=""> <span class=""># Virt-resize --resize / dev / sda1 = + 200M --expand / dev / sda2 hda.img hda-new.img</span></span>
</pre></div></div><p> <span class=""> LVM partition expansion, expansion lv_root logical volume:</span> </p><div class=""><div class=""><pre> <span class=""> <span class=""># Virt-resize --expand / dev / sda2 --LV-expand / dev / vg_livecd / lv_root hda.qcow2 hda-new.qcow2</span></span>
</pre><pre><span class=""><span class=""><br></span></span></pre><pre><span class=""><span class="">Thanks,</span></span></pre><pre><span class=""><span class="">Punit</span></span></pre></div></div></blockquote></div>