Hot resize of a virtio disk for a RHEL 5 guest in RHEV 3.3

Latest response

RHEV 3.3 has added the ability to grow a virtual disk for the guest while the guest is still up. This works for RHEL 6 guests but doesn't work for RHEL 5 VMs. Resizing the disk in the RHEV-M web interface works as expected, but the new disk size isn't picked up by the guest OS.

The RHEL 5 guest is fully updated (latest kernel & rhevm-guest-agent packages) and I can hot add disks with no issues.

Is this a limitation of the RHEL 5 kernel? I can't find anything in the RHEV product documentation to suggest the resize disk functionality is not available for RHEL 5 guests.

Responses

With RHEL 5, device geometry is only read at boot. You can force a re-read of a device's geometry with the blockdev command, but it only works if the node is not busy (which means you can resize devices that aren't being used for root volumes/partitions).

For hot-add of devices under RHEL 5, see:

With RHEL 5, you have to explicitly tell the system to scan for new dev-nodes. You can do this either by using the tools in the sg3_utils package or by echo'ing "- - -" to the HBA's scan file.

Check out:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html

and

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/scanning-storage-interconnects.html

and

With RHEL 5, you have to explicitly tell the system to scan for new dev-nodes. You can do this either by using the tools in the sg3_utils package or by echo'ing "- - -" to the HBA's scan file.

Check out:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html

and

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/scanning-storage-interconnects.html

Thanks for the info.

Unfortunately since this is for disks presented as /dev/vd? in a virtual guest, I don't think the above methods are applicable.

What I was hoping for was a way for the kernel to detect the updated disk geometry and allow me to do a pvresize on it. This way I could lvextend the LV and resize2fs the filesystem without having to unmount or reboot.

Seeing I can hot add disks I can always use pvcreate and extend the VG that way.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.