Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 2026 20:55:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 296208] gpart(8): Backup/Create/Restore Differences
Message-ID:  <bug-296208-227-epyxNpGLpP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-296208-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296208

--- Comment #1 from Jose Luis Duran <jlduran@FreeBSD.org> ---
(In reply to Slawomir Wojciech Wojtczak from comment #0)

In my opinion:

   # gpart backup md0 | gpart restore md1

Works as expected. The fact that md0 has a first usable LBA of 40, versus the
"standard" 34 of md1, has nothing to do with gpart restore (as gpart backup
does not describe or preserve the underlying GPT header's first usable LBA
value). By extension, this shift explains the slight discrepancy in the
remaining free sectors at the end of the disk.

So to summarize, md0 has a "non-standard" first usable LBA = 40, whereas md1
has a standard first usable LBA = 34.

Now, why gpart decided alter the header boundaries for md0 in the first place
is a separate debate:

    # gpart add -a 4k -s 40M -t efi -l efiboot0 md0

In my opinion, simply requesting 4K alignment on a new partition should not
permanently alter the disk's first usable LBA and disable LBA 34–39 without us
explicitly telling it to do so. But that is a separate issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-296208-227-epyxNpGLpP>