<div dir="ltr">Hi Rich,<div><br></div><div>I read this article :- <a href="https://inthecloud.readthedocs.org/zh_CN/latest/index.html" target="_blank" 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"> </font></div>
<div><font face="Calibri, sans-serif" size="3"><br></font></div><div><font face="Calibri, sans-serif" size="3">and used below set of commands :- </font></div><div><font face="Calibri, sans-serif" size="3"><br></font></div>
<div><h3>Virtual Machine File System expansion<a href="https://translate.googleusercontent.com/translate_c?depth=1&hl=en&prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789&rurl=translate.google.com.hk&sl=zh-CN&u=https://inthecloud.readthedocs.org/zh_CN/latest/posts/ch03.html&usg=ALkJrhiaix6TlqJPXyUpzoTY1kZriRpW3Q#id11" title="Permanent link to title" target="_blank"></a></h3>
<p>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.</p><p><strong>Linux file system expansion (libguestfs)</strong></p>
<blockquote><p>For details, please refer to <a href="https://translate.googleusercontent.com/translate_c?depth=1&hl=en&prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789&rurl=translate.google.com.hk&sl=zh-CN&u=http://libguestfs.org/&usg=ALkJrhhw7qzZZdvvvGYkIoGrDbC9DiD_qw" target="_blank">libguestfs site</a> .</p>
<ol><li style="margin-left:15px">View disk</li></ol><div><pre style="white-space:pre-wrap"> # Virt-filesystem --all --long -h -a hda.img
</pre></div><ol start="2"><li style="margin-left:15px">Expansion disk copy to be created, while the expansion of 10G (Assuming the original disk size is 10G)</li></ol><p>For RAW format:</p><div><pre style="white-space:pre-wrap">
# Truncate -r hda.img hda-new.img
# Truncate -s + 10G hda-new.img
</pre></div><p>For QCOW2 and other compressed formats:</p><div><pre style="white-space:pre-wrap"> # Qemu-img create -f qcow2 -o preallocation = metadata hda-new.img 20G
</pre></div><ol start="3"><li style="margin-left:15px">Extended partition size</li></ol><p>Ordinary extended partition, / boot partition expansion 200M, all the rest to the / partition:</p><div><pre style="white-space:pre-wrap">
# Virt-resize --resize / dev / sda1 = + 200M --expand / dev / sda2 hda.img hda-new.img
</pre></div><p>LVM partition expansion, expansion lv_root logical volume:</p><div><pre style="white-space:pre-wrap"> # Virt-resize --expand / dev / sda2 --LV-expand / dev / vg_livecd / lv_root hda.qcow2 hda-new.qcow2
</pre></div><div>Thanks,</div><div>Punit</div></blockquote></div><div><font face="Calibri, sans-serif" size="3"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 4, 2014 at 3:53 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Sep 04, 2014 at 09:51:53AM +0800, Punit Dambiwal wrote:<br>
> Hi,<br>
><br>
> I read this article and found that we can expand the VM disk online but it<br>
> doesn't expand the filesystem of the VM.....<br>
<br>
</div>Which article?<br>
<br>
virt-resize can only be used for offline expansion of disks.<br>
<br>
If you used virt-resize, what precise commands did you type and<br>
what exact errors did you see?<br>
<br>
Rich.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
virt-df lists disk usage of guests without needing to install any<br>
software inside the virtual machine. Supports Linux and Windows.<br>
<a href="http://people.redhat.com/~rjones/virt-df/" target="_blank">http://people.redhat.com/~rjones/virt-df/</a><br>
</font></span></blockquote></div><br></div>