Secondary drive resizing in Virtual Box

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
Kevo05s
Level 1
Level 1
Posts: 1
Joined: Thu Mar 21, 2024 9:40 pm

Secondary drive resizing in Virtual Box

Post by Kevo05s »

Hello everyone,

I'm not sure if this is a beginner question but it definitely feels like it falls in the stupid area, as I've done a few questionable things to get here.

My current setup is Windows 10 Pro as a host and Linux Mint in a VM (ran by virtualbox). I have a JellyFin server in that VM and it works absolutely great. I set up 2 drives in that VM, the Boot drive and the Media drive. The boot drive was originally 45GB and the Media drive was 1.2TB. I ran out of space on both (JellyFin uses the boot drive as a cache for encoding). I successfully upsized my boot drive by enlarging it in VirtualBox first to 90GB, and then going in the Disks app to extend my partitions to the new amount. Here comes my issue:

When I did the same steps for my Media drive, I cranked it to 2TB as it is the limit that VirtualBox gives me. When I opened my VM, the file explorer didn't report a change in size (expected) but when I opened the Disks app, it showed me as if my drive was 2.2TB and that I only had 100GB left of space. This makes no sense, the drive does only have 100GB of space left, but that's when it's at 1.2TB. Is there a way to make the Disks app re-scan the partitions?

So far I have unmounted and even detached the drive from the VM, rebooted the VM and opened the Disks app, it did recognize that the drive was gone, but as soon as I re-attach it, it shows the same error.

Edit: Forgot to add, I am running Mint 20.1 according to System info, the drive is EXT4 and the disk usage analyser confirms that it has 1.1TB out of 1.2TB

Thank you for your help,
Kevo05s
Last edited by SMG on Thu Mar 21, 2024 10:08 pm, edited 1 time in total.
Reason: Moved from Beginner Questions to Virtual Machines because this is a VM related issue.
Reddog1
Level 7
Level 7
Posts: 1939
Joined: Wed Jun 01, 2011 2:12 pm

Re: Secondary drive resizing in Virtual Box

Post by Reddog1 »

When I had something similar happen, I increased the vm size. Then, I downloaded the Gparted.iso and loaded that into the virtual CD drive. With the virtual CD in first boot position I booted my VM with gparted, and then used gparted to increase the size of my partition into the free space created within the VM. One thing to remember is that there must be enough free space on the original VM drive for the resizing to actually work--files are cached on the drive while the operation is taking place. If a drive is too full, and it appears that yours may be, the resizing will fail, so you may have to create free space in your guest by moving files onto your host, before you can resize your guest partition (hope that made sense).
Post Reply

Return to “Virtual Machines”