Page 1 of 1

Dynamic drive size?

Posted: 17. Aug 2009, 12:14
by rassman
Vbox 3.0.4

I have used Virtualbox for a few years and though I nearly always let VBox dynamically resize the main system drive, I have never actually hit the limit before, because I go for a decent initial size which I know is about right for my particular Linux installs.

So my question is 'When does vbox resize the drive?'

My main Vmachine is my Debian, It's system drive is local while the data drives are on a USB drive. On the usb drive I use fixed size allocation then just create a new vdi if I need more space, copy and then reclaim the old vdi. The system part rarely grows after the day I install it, I already know which applications I like so I go straight for those and hardly ever add extras.

But because this has been my main machine for a long while it has crept up until I got the 100% full warrning while loading a fairly large netbean addition. The addition went on and works as it should, but the vdi is saying 100% full. So I tested it further (as you do) (don't worry I keep good backups), I transfered a heafty file across the network to the full vdi, it went in. But according to 'df' the drive size has not changed and is still 100% full.

So, that is what has happened, can any of you tell me what ought to have happened?

(I can fix this by moving my Debian into a new vdi so I am not worried about that side of things)

Re: Dynamic drive size?

Posted: 17. Aug 2009, 12:36
by Sasquatch
The dynamic resize option is such that it doesn't occupy all the space on your hard drive when you create it. When you create a new dynamic VDI, it will be a few kilobytes in size and will grow as you put more data on the virtual hard drive. There is a limit to how big it will grow: the size you enter when you create it. E.g. a 10 GB dynamic VDI will not grow beyond the designated 10 GB. You can't expect 11 GB to fit on a 10 GB drive. If you want to create a larger VDI, see the VirtualBox FAQ for how to do that. You can create a 100 GB VDI, but only allocate 10 GB for the partitions, then when you run out of virtual disk space, you can simply enlarge the partition.

Re: Dynamic drive size?

Posted: 17. Aug 2009, 14:39
by mpack
rassman wrote:The addition went on and works as it should, but the vdi is saying 100% full.
Where does it say this? Is this a statistic reported by the guest, or is this a warning that VBox issues, which I don't know about because none of my VDIs are more than about 10% full?

If you just mean that the VDI has reached its maximum size then that just means that it's fully allocated, not full: if you were to create a 10GB drive, copy 10GB of files to it, then delete all the files, then the VDI would still be fully allocated (maximum size), but the drive itself would be empty as far as the OS was concerned. There are ways to shrink that VDI again, though the procedure is somewhat inconvenient in the current versions of VBox.