Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When increasing the size of a full disk, the root partition does not resize accordingly #3389

Open
andrei-toterman opened this issue Jan 29, 2024 · 1 comment
Labels

Comments

@andrei-toterman
Copy link
Contributor

Describe the bug
Normally, when you increase the disk size of an instance (mp set local.instance.disk=...), the root partition gets resized by cloud-init to use the newly available space on the disk. But when the disk is already used at full capacity, increasing the disk size will not automatically increase the root partition size.

To Reproduce

  1. multipass exec instance -- dd if=/dev/zero of=big_file bs=1M count=10000 # or more if needed to fill the disk
  2. multipass stop instance
  3. multipass set local.instance.disk=20GB # or more than the current size
  4. multipass exec instance lsblk
sda       8:0    0    20G  0 disk 
├─sda1    8:1    0   4.9G  0 part /

Expected behavior
Have /dev/sda1 expand to take up the available space in /dev/sda.

@akauppi
Copy link

akauppi commented Feb 9, 2024

Experienced this some while back. It's nice this is now reported.

If anyone needs to manually be able to expand that disk, this may help (my notes):

Troubleshoot - if you resize disk, but Ubuntu doesn’t see it that way.

$ sudo fdisk -l /dev/sda
# Within Ubuntu, to see the disk image size

$ sudo parted -l

# On host:
$ multipass restart {name}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants