debian: partitions lost after resizing disk

Discussions about using Linux guests in VirtualBox.
scain
Posts: 4
Joined: 20. Jun 2023, 16:03

Re: debian: partitions lost after resizing disk

Post by scain »

It is dynamically allocated.

Now going through more posts in the forum, I should probably add more info:
* I can open in CloneVDI ("Ok" result).
* I cloned successfully and was still able to boot, however again to "unknown filesystem"
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: debian: partitions lost after resizing disk

Post by scottgus1 »

goddard92340 wrote: 20. Jun 2023, 16:59 I forgot check SSD box on disk type of sata controler.
Probably not, that is supposed to only tell the VM OS that it can do TRIM, if it is enabled to do so.

I'll try a Debian 12 VM later with a 7.5GB dynamic drive and see If I too get a killed drive after resizing.
scain
Posts: 4
Joined: 20. Jun 2023, 16:03

Re: debian: partitions lost after resizing disk

Post by scain »

I have noticed that after resizing the VMDK file, from CloneVDI perspective, it changed from Ext4 (before) to Ext1 (after resize).
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: debian: partitions lost after resizing disk

Post by mpack »

scain wrote: 20. Jun 2023, 17:11 * I can open in CloneVDI ("Ok" result).
That simply means that there is nothing wrong with the drive: which none of the discussion above indicated anyway. As I said, VirtualBox doesn't care about partitions, that's a purely software element. CloneVDI will generally be silent about partitions too - it's just that certain additional features may not work if it doesn't recognize what's on the drive.
scain
Posts: 4
Joined: 20. Jun 2023, 16:03

Re: debian: partitions lost after resizing disk

Post by scain »

Thank you @mpack for the explanation. Would you be able to suggest a way to debug the issue? I can reproduce from a fresh VM, meaning I can probably find out how the VBox resize process is destroying the partition (or something else).

I am able to recover files with PhotoRec, but not able yet to recover partitions with Testdisk. The result always shows no files found.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: debian: partitions lost after resizing disk

Post by fth0 »

FWIW, I'll make an educated guess that the most important detail here is that we're talking about VMDK images. AFAIK, support for resizing VMDK images has only been implemented lately in VirtualBox 7.0, so I wouldn't be surprised if errors exist.

What variants of VMDK files did you create?

scottgus1 wrote: 20. Jun 2023, 17:11 I'll try a Debian 12 VM later with a 7.5GB dynamic drive and see If I too get a killed drive after resizing.
As an alternative, you could add a second virtual disk image to any existing Linux VM and play with that (saves the time for an OS installation). But use one of the VMDK variants in any case. ;)
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: debian: partitions lost after resizing disk

Post by scottgus1 »

Good to know, fth0! Will use a vmdk in my test.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: debian: partitions lost after resizing disk

Post by mpack »

fth0 wrote: 20. Jun 2023, 23:25 AFAIK, support for resizing VMDK images has only been implemented lately in VirtualBox 7.0
Is this mentioned in the user manual? I don't see it.

This wouldn't be the first time that a partial implementation was slipped in, e.g. for VHDX, but not supported.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: debian: partitions lost after resizing disk

Post by fth0 »

mpack wrote: 21. Jun 2023, 12:27 Is this mentioned in the user manual?
From Change Log - Version 7.0.6 (2023-01-17):

Code: Select all

Storage: Added support for increasing the size of the following VMDK image variants: monolithicFlat, monolithicSparse, twoGbMaxExtentSparse, twoGbMaxExtentFlat
Post Reply