

Typically fdisk was the tool of choice for the first step and a utility like partprobe (or a reboot) for the second step.īut things changed and you can use a great software called growpart make the kernel aware of the bigger partition.The partition is not automatically adjusted and needs to be resized as well in two steps New disk size detected, partition is unchanged When the kernel finishes the rescan (usually within fractions of a second), it is aware of the larger disk: You can follow the procedure in syslog – and you should see some lines similar to this: sd 2:0:1:0: 106954752 512-byte logical blocks: (54.8 GB/51.0 GiB) If you resized another disk, replace sdb with the disk number you changed. This triggers a rescan of the device sdb. To make the kernel aware, one can issue the following command as root: echo 1 > /sys/class/block/sdb/device/rescan If the option is greyed out then make sure to remove existing snapshots.Īlthough the disk is resized, the Linux kernel is not aware of that change.ĭisk is resized, but the linux kernel is not aware of the new size without reboot or interaction If you want to enlarge the second disk, you simply change the VM configuration and increase the disk there. The disk layout of Performance Analyzer looks like this: It’s important to know that only the last or the only partition within a disks (green color) can be resized in an straightforward way. That is acceptable since we avoid swapping at all costs anyway. We skipped the swap partition and have a swap file within the root file system. The first disk holds the operating system, the second disk the data. The Performance Analyzer appliance has a two disk configuration. Something we didn’t mention – all is done without LVM! resize the last partition to add the new space.detect the resize of either the boot or the data disk.Performance Analyzer is smart enough to detect the change, and enlarges both the partition and the file system contained in the partition.

When following that guide for the first time on a production system – we would recommend a backup (without snapshots). That can be done while the virtual machine is running using pretty much any modern linux distribution – just make sure that no snapshots are active! There is only a simple resize of the virtual disk of the virtual appliance required and the scripts in our appliance handle everything else automatically. On the other hand our goal was, that no customer needs to oversize the data disk – and our automatic resizing solves that issue in a very convenient way:

Like many other customers, they want to make sure that the disks are not filling up anytime soon. Some days ago, one of our Performance Analyzer customers asked in a workshop how we handle the data growth over time and how they can resize the data partition. Enlarge a disk and partition of any Linux VM without a reboot
