{"id":11866,"date":"2025-12-06T03:21:03","date_gmt":"2025-12-06T08:21:03","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=11866"},"modified":"2025-12-06T03:21:03","modified_gmt":"2025-12-06T08:21:03","slug":"expanding-a-qcow2-backed-system-disk-host-guest","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=11866","title":{"rendered":"Expanding a qcow2-backed system disk (host + guest)"},"content":{"rendered":"<div class=\"flex flex-col gap-4 flex-auto\">\n<div class=\"answer-content mt-3 pride:mt-2 min-w-full flex flex-col gap-4 rounded-md\">\n<p>Expanding a qcow2-backed system disk (host + guest) &#8212; guest volume is lvm and xfs file system<\/p>\n<p>HOST (resize qcow2)<\/p>\n<ol class=\"markdown-list\">\n<li>Optional backup:<br \/>\ncp &#8211;reflink=auto \/vms\/fedora02.qcow2 \/vms\/fedora02.qcow2.bak<\/li>\n<li>Offline resize (VM stopped):<br \/>\nqemu-img resize \/vms\/fedora02.qcow2 +5G<br \/>\n# Start the VM after resizing.<\/li>\n<\/ol>\n<p>GUEST (grow partition, PV, LV, filesystem)<\/p>\n<ol class=\"markdown-list\">\n<li>Confirm the disk shows the larger size:<br \/>\nlsblk -o NAME,SIZE,TYPE,MOUNTPOINT<br \/>\n#If needed:<br \/>\n#partprobe \/dev\/sda<\/li>\n<li>Grow the LVM partition (sda2) to the end of the disk:<br \/>\ndnf install -y cloud-utils-growpart<br \/>\ngrowpart \/dev\/sda 2<br \/>\npartprobe \/dev\/sda<\/li>\n<li>Resize the LVM PV and extend the root LV:<br \/>\npvresize \/dev\/sda2<br \/>\nlvextend -l +100%FREE \/dev\/fedora\/root<\/li>\n<li>Grow the filesystem:<br \/>\nxfs_growfs \/<\/li>\n<li>Verify:<br \/>\nlsblk -o NAME,SIZE,TYPE,MOUNTPOINT<br \/>\ndf -h \/<\/li>\n<\/ol>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Expanding a qcow2-backed system disk (host + guest) &#8212; guest volume is lvm and xfs file system HOST (resize qcow2) Optional backup: cp &#8211;reflink=auto \/vms\/fedora02.qcow2 \/vms\/fedora02.qcow2.bak Offline resize (VM stopped): qemu-img resize \/vms\/fedora02.qcow2 +5G # Start the VM after resizing. GUEST (grow partition, PV, LV, filesystem) Confirm the disk shows the larger size: lsblk -o &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[47,1023],"class_list":["post-11866","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-fedora","tag-lvm"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11866"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11866\/revisions"}],"predecessor-version":[{"id":11867,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11866\/revisions\/11867"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}