Options

Can you expand a HDD on an online Linux VM?

pwjohnstonpwjohnston Member Posts: 441
On Windows since at least 2008, you have been able to expand a disk on a running virtual machine in VMware (or any other virtualization/SAN LUN) and then expand the disk/volume within Windows without needing downtime/maintenance.

We have SLES 11 VM’s with ext3 partitions in their LUNs. I’m sure that there has to be a way to do this. Is this possible with ext3, do I need to be using ext4, LVM, btrfs, I don’t know. I keep searching for this on the web and as soon as I think I’ve found the answer there is a “now, reboot the virtual machine” in it. Sorry I don’t have as much Linux experience as I do in Windows.

Comments

  • Options
    jibbajabbajibbajabba Member Posts: 4,317 ■■■■■■■■□□
    If you don't have LVMs the. You need some downtime as it requires deleting and recreating the partition table and unless you know what you are doing (and tested guides on a test VM) you likely end up with a broken system (snapshots help of course). Now IF the server in question has LVMs and the 'drive' you need expanding is indeed a logical volume, then you are lucky. Expanding a volume can be done online, without reboot. However, not many Linux systems recognise a drive change / increase without a reboot (reboot takes minutes if not seconds though, beauty of a VM).

    However, there are ways to rescan the SCSI bus, which MAY cause Linux to recognise the increased / added VMDK.

    One way is explained here, post 2

    linux: rescan disk geometry for resized virtual... | VMware Communities

    Each distro is different though so better Google a bit more :)
    My own knowledge base made public: http://open902.com :p
Sign In or Register to comment.