[DragonFlyBSD - Bug #3423] (New) gpt(8): expand does not update the usable LBA range

sigttou bugtracker-admin at leaf.dragonflybsd.org
Wed Sep 23 04:15:40 PDT 2026


Issue #3423 has been reported by sigttou.

----------------------------------------
Bug #3423: gpt(8): expand does not update the usable LBA range
http://bugs.dragonflybsd.org/issues/3423

* Author: sigttou
* Status: New
* Priority: Normal
* Category: Userland
* Target version: 6.6
* Start date: 2026-09-23
----------------------------------------
gpt expand moves the backup GPT to the new end of the device but does not
update the usable LBA range (hdr_lba_end, the last usable LBA).  After a disk
grows, the header still reports the old, smaller range while the last
partition extends past it:

<pre>
last usable LBA = 131038   (old 64 MB size)
partition 0 end = 260095   (new 128 MB size)
</pre>

On a fresh 128 MB disk, gpt create reports 262110, so expand simply does not
refresh the value.

This is the problem noted in #3276 ("Usable LBA showed the old disk's size").

Fix attached: set hdr_lba_end in both the primary and secondary headers.

Attached: gpt-expand-last-usable-fix.patch


---Files--------------------------------
gpt-expand-last-usable-fix.patch (705 Bytes)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list