Linux 要做 Software RAID 等等,會需要做 Partation 的複製,一般都是用下述命令:
- sfdisk -d /dev/sda | sfdisk /dev/sdb
但是 sfdisk 切超過 2TB 的會有下述訊息:
sfdisk doesn't understand GUID Partition Table (GPT) and it is not designed for large partitions. In particular case use more advanced GNU parted(8).
This command however supports >2 TB partitions and LVM.
超過 2TB 的需要用 sgdisk。
Linux 大於 2T 的分割磁區格式複製
sgdisk 在 Debian 安裝方式:
- apt-get install gdisk
sgdisk 說明
- sgdisk - Command-line GUID partition table (GPT) manipulator for Linux and Unix
- sgdisk: GPT fdisk is a text-mode menu-driven package for creation and manipulation of partition tables.
sgdisk 的分割區格式複製、還原
- sgdisk --backup=sda.table /dev/sda # 將格式存到 sda.table file
- sgdisk --load-backup=sda.table /dev/sdb # 將 sda.table 格式複製到 sdb (sdb = sda)