With a SATA drive connected to a SATA controller, we get: start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 1 GPT part - FreeBSD UFS/UFS2 40 5860533095 2 GPT part - FreeBSD UFS/UFS2 5860533135 32 Sec GPT table 5860533167 1 Sec GPT header (The 6 sector partition is for 4KiB alignment.) With a USB bridge, we get this: start size index contents 0 1 PMBR 1 1 Pri GPT header 2 4 Pri GPT table 6 6 1 GPT part - FreeBSD UFS/UFS2 12 732566573 2 GPT part - FreeBSD UFS/UFS2 732566585 55 732566640 4 Sec GPT table 732566644 1 Sec GPT header Note that these are 4 KiB sectors, so the GPT header no longer starts at 512, it now starts at 4096. It does work, so long as we have the disk attached to the USB bridge. But move the disk from the USB bridge to a direct sata controller, and it breaks: start size index contents 0 1 PMBR 1 5860533167 The GPT headers are not found, thus the partitions are not found. Unusable. I suspect that moving a disk in the opposite direction is probably broken as well. [ Yes, with the USB's 4 KiB sectors the 6 sector alignment partition is not needed. And with just one large data partition we can skip partitioning and just newfs the drive. ] Fix: Have the kernel look for a GPT header at 4096 as well as at 512. (And similarly for the secondary header.)
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
Hi, GPT uses logical block addresses, not bytes. So, if you changed sector size, then you lose the access to the GPT. If you want get access to GPT, that has been created on the device with 4k sized sector, then you can use geom_nop(4). -- WBR, Andrey V. Elsukov
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped