sfdisk is a program to copy partition information. This is for disks with MBR partition. Use sgdisk if you have GPT partition table.

To save partition info, run

sfdisk -d /dev/sda > part_table

To restore

sfdisk /dev/sda < part_table

Copy Partition to Another Disk

This is useful when you setting up raid or when you want to replace a disk in raid.

sfdisk -d /dev/sda | sfdisk /dev/sdb

Once copied, you may need to run

sfdisk -R /dev/sdb

So Linux kernal will read the new partition.

See hdd

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *