FreeBSD-provided .vhd with VirtualBox: gpart I/O errors after resizing the virtual hard disk

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Sun, 17 Jan 2021 18:22:14 +0000
VirtualBox 5.2.44 r139111 on FreeBSD-CURRENT.

01. Add FreeBSD-12.2-RELEASE-amd64.vhd to a machine
02. use Virtual Disk Manager to resize it to 2.0 TB
03. apply, close
04. boot single user
05. gpart show /dev/ada0
07. observe reported corruption
08. gpart recover /dev/ada0
09. I/O error <https://i.imgur.com/MoUBk6q.png>
10. gpart show /dev/ada0
11. no reported corruption
12. shutdown -r now
13. observe reported corruption:

 > gptboot: invalid backup GPT header

<https://i.imgur.com/Mi6hNTM.png>

For me, this seems to be consistently reproducible.

Thoughts?

Boot proceeds and <https://i.imgur.com/c7pfsWC.png> I guess that the UFS 
file system is automatically grown, but the reported I/O errors make me 
nervous.

% uname -v
FreeBSD 13.0-CURRENT #75 main-c572-g82397d791: Sun JanĀ  3 20:00:09 GMT 
2021 
root_at_mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
%
Received on Sun Jan 17 2021 - 17:22:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC