An attempt to resize disk and filesystem inside a Virtual Machine fails with the following error:
Resizing failed. Unable to resize the last volume. The file system of this volume might be damaged or not supported.
resize2fs command inside the VM provides the following error:
the combination of flex_bg and !resize_inode features is not supported by resize2fs
resize2fs cannot resize FS that has
resize_inode feature disabled and
According to manual
resize_inode feature gives following profit:
resize_inode This file system feature indicates that space has been reserved so the block group descriptor table can be extended by the file system is resized while the file system is mounted. The online resize operation is carried out by the kernel, triggered, by resize2fs(8). By default mke2fs will attempt to reserve enough space so that the filesystem may grow to 1024 times its initial size. This can be changed using the resize extended option.
FS resize functionality depends on this feature. Since it is disabled for the partition, it cannot be resized.
- Add a new drive to the VM;
- Create all partitions but the last one with the same size they are on the original disk;
Copy their contents from the 1st disk to the 2nd one with
# dd if=/dev/sda1 of=/dev/sdb1 # dd if=/dev/sda2 of=/dev/sdb2
- Create the last partition of the necessary (increased) size;
- Copy contents of the affected partition with
rsyncto the last partition of the second disk.