kern/170945: disk layout not portable between direct connect and
USB bridge
Dieter
freebsd at sopwith.solgatos.com
Thu Aug 23 22:30:07 UTC 2012
>Number: 170945
>Category: kern
>Synopsis: disk layout not portable between direct connect and USB bridge
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 23 22:30:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Dieter
>Release: FreeBSD 8.2 amd64
>Organization:
>Environment:
FreeBSD 8.2 amd64
>Description:
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. ]
>How-To-Repeat:
>Fix:
Have the kernel look for a GPT header at 4096 as well as at 512.
(And similarly for the secondary header.)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list