Space freed on dynamic drive won't be reversed to physical d

This is for discussing general topics about how to use VirtualBox.
Post Reply
a cooperator
Posts: 85
Joined: 3. Feb 2014, 07:02
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7
Location: Hadramawt -Yemen

Space freed on dynamic drive won't be reversed to physical d

Post by a cooperator »

Hi,
I know that:

A dynamically allocated hard drive fill will only use space on your physical hard drive as if fills up(up to a maximum fixed size), although it will not shrink again automatically when space on it is freed

I got asking myself why dynamic will not shrink when data on it is deleted.
Thus, I would like anyone to confirm for me if that sentence underlined above means this below::
When space on dynamic virtual drive is freed, then the space freed on dynamic drive will not be reversed to physical drive.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Space freed on dynamic drive won't be reversed to physic

Post by mpack »

The reason for this behaviour is simple: VirtualBox can detect when a sector is used (i.e. the guest writes to it), but it cannot detect when a sector is not used. Short of the trim command used on SSDs, there is no operation performed on disk sectors which indicates non-use.

VirtualBox is not an operating system. Guest data structures placed on the drive have no meaning to the hardware, and hence no meaning to virtual hardware.

[Topic moved to "Using VirtualBox", since your question is irrelevant in "Windows Hosts".]
a cooperator
Posts: 85
Joined: 3. Feb 2014, 07:02
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7
Location: Hadramawt -Yemen

Re: Space freed on dynamic drive won't be reversed to physic

Post by a cooperator »

mpack wrote: The reason for this behaviour is simple: VirtualBox can detect when a sector is used (i.e. the guest writes to it), but it cannot detect when a sector is not used. Short of the trim command used on SSDs, there is no operation performed on disk sectors which indicates non-use.

VirtualBox is not an operating system. Guest data structures placed on the drive have no meaning to the hardware, and hence no meaning to virtual hardware.
Thanks a lot,

I think there is missunderstanding. I explained 'although dynamically allocated hard drive will not shrink again automatically when space on it is freed' with 'When space on dynamic virtual drive is freed, then the space freed on dynamic drive will not be reversed to physical drive.'


It is quite obvious that dynamically allocated hard drive will shrink(reduces) again automatically when space on it is freed.
Last edited by a cooperator on 14. Mar 2014, 14:34, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Space freed on dynamic drive won't be reversed to physic

Post by mpack »

Well, that didn't take long. I'm getting rather tired of being contradicted by you on subjects you clearly know very little about.

Explain to me what freeing space on a drive would involve? What would change on the drive? Explain this without referring to any guest data structures.
a cooperator
Posts: 85
Joined: 3. Feb 2014, 07:02
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7
Location: Hadramawt -Yemen

Re: Space freed on dynamic drive won't be reversed to physic

Post by a cooperator »

mpack wrote:Well, that didn't take long. I'm getting rather tired of being contradicted by you on subjects you clearly know very little about.

Explain to me what freeing space on a drive would involve? What would change on the drive? Explain this without referring to any guest data structures.

Could you please understand me I really struggle to let my question clear as much as I can because I am really encountering a problem writting in English language.

I don't want to contradict you.

I only want to know whether dynamically allocated hard drive will not shrink again automatically when space on it is freed or it will shrink.
I am expecting that dynamically allocated hard drive will shrink(reduce) again automatically when space on it is freed.
For instance if the used space on dynamic drive is 20GB, then I have deleted some data(5GB) on it, then the used space on it will reduce to 15GB

However, 'When space on dynamic virtual drive is freed, then the space freed on dynamic drive will not be reversed to physical drive.'

In other words,
The size of the fixed virtual hard disk will not change when data is added or deleted from it.
However, the size of dynamic virtual hard disk will change when data is added or deleted from it.
Physical hard disk will not change when data is deleted from dynamical hard disk.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Space freed on dynamic drive won't be reversed to physic

Post by mpack »

Your first sentence in your first post in this thread made clear that you already understood that dynamic drives never shrink in size on the host. So as to whether this statement is correct, well of course it is.

I assumed you wanted to know why that statement is correct. My first answer explained that. I don't see what else needs to be said.

I won't address your "In other words" list, much of which is wrong. The truth can be deduced from a careful reading of my first post.
a cooperator
Posts: 85
Joined: 3. Feb 2014, 07:02
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7
Location: Hadramawt -Yemen

Re: Space freed on dynamic drive won't be reversed to physic

Post by a cooperator »

mpack wrote:Your first sentence in your first post in this thread made clear that you already understood that dynamic drives never shrink in size on the host. So as to whether this statement is correct, well of course it is.

I assumed you wanted to know why that statement is correct. My first answer explained that. I don't see what else needs to be said.

I won't address your "In other words" list, much of which is wrong. The truth can be deduced from a careful reading of my first post.
Thanks a lot,

Then, The size of dynamic virtual hard disk will change when data is added or deleted from it.(When data is written to it, it will decrease, and when data is deleted from it will be increase)
The size of the fixed virtual hard disk will not change at all when data is added or deleted from it.
Physical hard disk will not change when data is deleted from dynamical hard disk, however, it will shrink up to the maximum fixed size specified for dynamic virtual disk when data is written to dynamical virtual disk.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Space freed on dynamic drive won't be reversed to physic

Post by mpack »

That makes no sense at all.

When sectors are first used on a dynamic disk, space will be allocated for them on the host. In other words, the host file size increases.

There is no corresponding shrinkage mechanism. Leaving SSDs aside, it is impossible to delete data from a standard hard disk. The only thing you can do is overwrite it with more data.
Post Reply