# Copy GPT Partition Tables Between Disks

DevFeed: [Copy GPT Partition Tables Between Disks](<https://devfeed.tech/articles/copy-gtp-partiotion-table-between-disks-27623.md>)

Original publisher: [Read original article](<https://gagor.pro/2014/07/copy-gtp-partiotion-table-between-disks/>)

Author: Tom

Published: 2014-07-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [RAID](<https://devfeed.tech/topics/raid.md>), [apt](<https://devfeed.tech/topics/apt.md>)

Tags: [apt](<https://devfeed.tech/tags/apt.md>), [debian](<https://devfeed.tech/tags/debian.md>), [install](<https://devfeed.tech/tags/install.md>), [linux](<https://devfeed.tech/tags/linux.md>), [partition](<https://devfeed.tech/tags/partition.md>), [raid](<https://devfeed.tech/tags/raid.md>), [table](<https://devfeed.tech/tags/table.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

## AI overview

A tutorial for copying a GPT partition table from one disk to another for RAID configuration using sgdisk, then randomizing partition UUIDs when both disks will be used in the same machine.

## Source excerpt

When configuring RAID it's quite important to have the same partition tables on every disk. I'v done this many times on msdos partition tables like this: sfdisk -d /dev/sda | sfdisk /dev/sdb but it's not working any more on GPT partition tables. Hopefully it still can be done but with different toolstack 😄 Install gdisk: apt-get install -y gdisk Then use sgdisk like this: sgdisk -R /dev/sd_dest /dev/sd_src sgdisk -G /dev/sd_dest First command will copy partition from /dev/sd_src to /dev/sd_dest. Second will randomize partition UUID's - needed only if you want to use disks in same machine (this is my case).