Did you install with the given cloud-config before resizing the VMDK? The resizing functionality is set to only resize once, so if you changed the disk size after the first install boot then it’ll not resize again.
You can test that this is the issue by removing /var/lib/rancher/resize.done and rebooting. If your disk isn’t properly resized afterwards then the issue is elsewhere.
growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=16775168 end=16777216 new: size=41940959,end=41943007
partprobe
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Error: Partition(s) 1 on /dev/vda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
Reboot
resize2fs /dev/vda1
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/vda1 is mounted on /opt; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/vda1 is now 5242619 (4k) blocks long.
All is OK.
So,
It needs a reboot before resize.
running commands in the sequence you describe is not working:
growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=16775168 end=16777216 new: size=41940959,end=41943007
partprobe
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Error: Partition(s) 1 on /dev/vda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
resize2fs /dev/vda1
resize2fs 1.42.13 (17-May-2015)
The filesystem is already 2096896 (4k) blocks long. Nothing to do!
Would you mind filing an issue for this? It does seem like there is something incorrect about the default console that’s causing this. Maybe a missing package or something like that.
Thank you for your answer!
Yes, we’ve installed the RancherOS with a cloud-config on a disk (10GB) with the resize option.
Afterwards, we have resized the 10GB disk to 40GB.
In my perspective, it would be very nice if there will be an “always-on” option for the resizing, like CoreOS:
If the disk will be extended on VM-Level, we just need to reboot the machine and the resize is done fully automatically.
Actually with the resize_fs setting, i did not need to call growpart, all you need is boot once, then reboot once again and then run resize2fs /dev/vda1
so at some degree growpart already works automated