What is GPT Partition ?
GPT (GUID Partition Table) is a standard for the layout of the partition table on a physical hard disk, using globally unique identifiers (GUID). GPT is a part of the EFI standard that defines the layout of the partition table. GPT is useful for creating filesystem on disk larger than 2TB. For smaller size of disks generally we use MBR but it does not support disk over 2TB.
sgdisk is a command-line GUID partition table (GPT) manipulator for Unix like systems.
In this article we are using sgdisk command to Clone/Copy a GPT Partition Table to Another Disk. You may got confuse with sgdisk parameters sequences, so be careful while using this command.
To clone GPT partition table command syntax are as following.
# sgdisk -R <New_Disk> <Existing_Disk>
The command syntax is bit confusing in sequence New disk and existing disk, so take care on it. Basically New Disk comes first.
Clone Partition Table on New Disk
Lets make a clone of Partition table to a new disk. For example our Existing disk is /dev/sda and need to clone partition table to new disk /dev/sdb.
# sgdisk -R /dev/sdb /dev/sda
Also set a new GUID on new drive after cloning the partition table
# sgdisk -G /dev/sdb