Difference between revisions of "Extend LVM on qcow2 images"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
* <code>qemu-img resize</code> -> <code>[[virt-resize]]</code> -> <code>[[lvextend|lvextend --resizefs]]</code> | * <code>qemu-img resize</code> -> <code>[[virt-resize]]</code> -> <code>[[lvextend|lvextend --resizefs]]</code> | ||
+ | |||
+ | |||
+ | Commands: | ||
* <code>[[qemu-img]] [[qemu-img resize|resize]] c845ba080f2326a51c53965af1ac6c18 +3G</code> | * <code>[[qemu-img]] [[qemu-img resize|resize]] c845ba080f2326a51c53965af1ac6c18 +3G</code> | ||
* <code>[[qemu-img info]]</code> | * <code>[[qemu-img info]]</code> |
Revision as of 11:33, 14 January 2020
- Example using
virt-resize
: https://fatmin.com/2016/12/20/how-to-resize-a-qcow2-image-and-filesystem-with-virt-resize/ - Follow https://www.technomenace.com/2014/08/how-to-extend-lvm-on-qcow2-images/
Process:
qemu-img resize
->virt-resize
->lvextend --resizefs
Commands:
qemu-img resize c845ba080f2326a51c53965af1ac6c18 +3G
qemu-img info
- Modify partition with:
fdisk /dev/vdX
+ Reboot pvresize /dev/vdX#
(Expand a PV after enlarging the partition)lvextend -L +1.8G /dev/mapper/VolGroup-lv_root
resize2fs /dev/mapper/VolGroup-lv_root
Activities
- Read about raw files and qcow2 differences: https://www.berrange.com/posts/2017/02/10/the-surprisingly-complicated-world-of-disk-image-sizes/
See also
qemu-img
:qemu-img info
,qemu-img check
,qemu-img resize
,qemu-img create
, qcow2,qemu-img rebase
,qemu-img convert
,qemu-img commit
,qemu-img ammend
- Qcow file format
- KVM, Installation, QEMU,
virsh
,virtinst
,libguestfs-tools
, libvirt, qemu, Red Hat Virtualization (RHV), MacVTap, Virtio, oVirt, KVM services, KVM networking, KVM graphics, CPU, KVM on ARM virt-resize
- LVM: LVM errors LVM scan commands
lkvmetad
, Add a new disk
- scan:
pvscan
vgscan
- LVM:
lvs
lvmscan
lvm fullreport
lvmreport
lvmconfig
lvmdump
lvmcheck
lvm dumpconfig
- Scan:
pvs
vgs
lvs
pvscan
vgscan
- PV:
pvcreate
pvremove
pvscan
pvremove
pvscan
pvs
pvchange
pvck
pvdisplay
pvresize
- LV:
lvdisplay
lvcreate
lvremove
,lvresize
,lvextend
,lvreduce
,lvrename
- VG:
vgdisplay
,vgcreate
,vgremove
,vgextend
,vgreduce
,vgscan
,vgchange
,vgrename
,vgcfgbackup
,vgcfgrestore
,vgimportclone
,vgck
- Check commands:
pvck
vgck
Advertising: