0

To reproduce:

  1. Create a new VM in the VirtualBox GUI with type "Linux" and version "Arch Linux (64-bit)". As part of this process create an 8 GB VDI disk with dynamic allocation and attach the latest Arch Linux ISO.
  2. Boot into the Arch Linux ISO and set up the OS in the usual way.
  3. Boot into the OS.
  4. Fill up the disk.
  5. Shut down the VM
  6. Open the virtual media manager and change the size of the disk to a larger size (30 GB in my case).
  7. Boot into the Arch Linux ISO.
  8. Run cfdisk /dev/sda and change the partition size.
  9. Write the partition table.
  10. Reboot

At this point fdisk -l and cfdisk /dev/sda report /dev/sda1 as being 30 GB, while df -h reports it as 8 GB. I'm not able to write more to the disk.

Workarounds I've tried:

  • Copying the disk image to another dynamically allocated VDI and attaching that instead.
  • Copying the disk image to another dynamically allocated VHD and attaching that instead.
  • Copying the disk image to another statically allocated VDI and attaching that instead.

This problem looks similar, except I've done all of this in only in VirtualBox without updating or rebooting the host OS.

0

This worked:

  1. Boot into the Arch Linux ISO.
  2. Run resize2fs /dev/sda1

I think this resizes the filesystem as opposed to just the partition.

  • Might be helpful to elaborate a bit on why this needs to be done when resizing partitions. – Mioriin Apr 27 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.