Skip to content

Commit e5f387e

Browse files
committed
records/2024-10-02: Correct GPT table size = 17 KiB
1 parent c9762e3 commit e5f387e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/records/2024-10-02.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
SPARSE_SIZE indicates the consecutive number of bytes (defaults to 4k) that must contain only zeros for qemu-img to create a sparse image during conversion. If SPARSE_SIZE is 0, the source will not be scanned for unallocated or zero sectors, and the destination image will always be fully allocated.
3232
```
3333

34-
在添加 `-S 0` 后测试,`qemu-img convert` 能够正常工作。由于一个 GPT 项只有 128B,而 `qemu-img` 默认 sparse size 为 4K,因此如果刚好对应的块设备区域没有被写零清空,那么本来为 0 的 GPT 表区域就会包含残留数据,进而导致了分区表校验和错误。
34+
在添加 `-S 0` 后测试,`qemu-img convert` 能够正常工作。由于整个 GPT 表有 17 KiB,而 `qemu-img` 默认 sparse size 为 4K,因此如果刚好对应的块设备区域没有被写零清空,那么本来为 0 的 GPT 表区域就会包含残留数据,进而导致了分区表校验和错误。
3535

3636
相关问题已反馈 Proxmox: <https://bugzilla.proxmox.com/show_bug.cgi?id=5754>。经过内部讨论,我们暂时修改了 `QemuServer.pm` 添加 `-S 1M` 参数,并且 `apt-mark hold qemu-server` 锁定版本避免该 Perl 代码被覆盖。
3737

0 commit comments

Comments
 (0)