Re: Clone GPT partition table - with Lenny ?
On Sun, Jul 6, 2014 at 3:54 PM, Ron Leach <ronleach@tesco.net> wrote:
>
> We have a RAID1 server running Lenny, one of whose two 2TB discs comprising
> the RAID arrays has failed. The discs were partitioned into 8 partitions
> during the Debian Lenny installation, and separate RAID1 arrays were built
> on 7 of those partitions, again during Debian installation. The Debian
> installer employed a GPT partition table for these discs; it also chose the
> (precise) partition boundaries.
>
> The machine is no longer an active server on our network; its role has been
> taken by a new-build Wheezy box. The end goal is to restore the RAID1
> arrays, then update the properly configured machine to Wheezy. So I need to
> partition the new disk, and I'd like it to be an exact clone of the existing
> RAID1 member, so that each partition starts on the same sector, etc. I can
> then repair the arrays using mdadm.
>
> As far as I can see, there is no command in fdisk or parted that will clone
> the partition table for me. I can create a partition table on the new disk,
> but I will need to have the exact partition start and end points, to be sure
> of exactly matching the existing disc.
>
> Is there, in Lenny, a command or tool for cloning a GPT?
>
> Alternatively, how could I find the exact partition start points on the
> working disk, and sizes, etc, to help me partition the new disk?
Use sgdisk to copy the disk layout to the new disk then add it to the
raid and let mdraid do the mirror.
Reply to: