
Hi, I read this article and found that we can expand the VM disk online but it doesn't expand the filesystem of the VM..... I tried the following but still it didn't work..all the below commands failed on the host.. I am using :- 1. Ovirt 3.4.3 2. Glusterfs 3.5 https://inthecloud.readthedocs.org/zh_CN/latest/index.html it's in Chinese but can translate here :- http://translate.google.com.hk/translate?hl=en&sl=zh-CN&u=https://inthecloud.readthedocs.org/&prev=/search%3Fq%3Dhttps://inthecloud.readthedocs.org%26biw%3D1440%26bih%3D789 Virtual Machine File System expansion <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> 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. *Linux file system expansion (libguestfs)* For details, please refer to libguestfs site <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> . 1. View disk # Virt-filesystem --all --long -h -a hda.img 1. Expansion disk copy to be created, while the expansion of 10G (Assuming the original disk size is 10G) For RAW format: # Truncate -r hda.img hda-new.img # Truncate -s + 10G hda-new.img For QCOW2 and other compressed formats: # Qemu-img create -f qcow2 -o preallocation = metadata hda-new.img 20G 1. Extended partition size Ordinary extended partition, / boot partition expansion 200M, all the rest to the / partition: # Virt-resize --resize / dev / sda1 = + 200M --expand / dev / sda2 hda.img hda-new.img LVM partition expansion, expansion lv_root logical volume: # Virt-resize --expand / dev / sda2 --LV-expand / dev / vg_livecd / lv_root hda.qcow2 hda-new.qcow2 Thanks, Punit

On Thu, Sep 04, 2014 at 09:51:53AM +0800, Punit Dambiwal wrote:
Hi,
I read this article and found that we can expand the VM disk online but it doesn't expand the filesystem of the VM.....
Which article? virt-resize can only be used for offline expansion of disks. If you used virt-resize, what precise commands did you type and what exact errors did you see? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/

Hi Rich, I read this article :- https://inthecloud.readthedocs.org/zh_CN/latest/index.html and used below set of commands :- Virtual Machine File System expansion <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> 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. *Linux file system expansion (libguestfs)* For details, please refer to libguestfs site <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> . 1. View disk # Virt-filesystem --all --long -h -a hda.img 1. Expansion disk copy to be created, while the expansion of 10G (Assuming the original disk size is 10G) For RAW format: # Truncate -r hda.img hda-new.img # Truncate -s + 10G hda-new.img For QCOW2 and other compressed formats: # Qemu-img create -f qcow2 -o preallocation = metadata hda-new.img 20G 1. Extended partition size Ordinary extended partition, / boot partition expansion 200M, all the rest to the / partition: # Virt-resize --resize / dev / sda1 = + 200M --expand / dev / sda2 hda.img hda-new.img LVM partition expansion, expansion lv_root logical volume: # Virt-resize --expand / dev / sda2 --LV-expand / dev / vg_livecd / lv_root hda.qcow2 hda-new.qcow2 Thanks, Punit On Thu, Sep 4, 2014 at 3:53 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Thu, Sep 04, 2014 at 09:51:53AM +0800, Punit Dambiwal wrote:
Hi,
I read this article and found that we can expand the VM disk online but it doesn't expand the filesystem of the VM.....
Which article?
virt-resize can only be used for offline expansion of disks.
If you used virt-resize, what precise commands did you type and what exact errors did you see?
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/

Please answer the question I asked:
If you used virt-resize, what precise commands did you type and what exact errors did you see?
otherwise I cannot help you. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
participants (2)
-
Punit Dambiwal
-
Richard W.M. Jones