Gmirror + gpart corruption on 9.3-PRE
Warren Block
wblock at wonkity.com
Fri Jul 25 13:45:27 UTC 2014
On Fri, 25 Jul 2014, Patrick M. Hausen wrote:
> Am 25.07.2014 um 07:34 schrieb Warren Block <wblock at wonkity.com>:
>> True. But partitioning can be specific to the drive. It's not like GPT-partitioned drives can be copied with dd (well, not correctly).
>
> Errrr ... sorry, but ... could you please elaborate on that? Up until now I was sure that any drive could be
> copied with dd(1).
>
> Puzzled. :-)
GPT partitioning puts a primary partition table at the beginning of the
drive, and a backup partition table at the end of the drive. Use dd to
copy a 500G drive to a 1TB drive, and that backup partition is now in
the middle of the drive. If the drives are even a single block
different in size, that backup table will be in the wrong place, not
found by the software and effectively lost.
This is dd's bug/feature: it does not understand the data being copied.
gpart(8) can back up and restore partition tables between
differently-sized drives, and does it correctly.
More information about the freebsd-stable
mailing list