0

I have an nvme drive with a logical and physical sector size of 4096. The block size of this drive as reported by blockdev --getbsz command to be 4096 as well.

The destination drive is an SSD with a logical and physical sector size of 512. The block size of this drive is 4096.

I tried using dd with the next parameters to clone the drive:

dd if=/dev/sda of=/dev/sdb

but the only partition that i am getting is GPT partition.

I also tried cloning the GPT table with those commands:

sgdisk

and

sfdisk

but no luck there. i am getting a drive with a partition table that every partition is 8 times smaller than the partition in the original drive.

Do you have any suggestions?

  • You might have better luck creating the partitions manually so that the sizes match on both source and destination, and then dd the individual partitions separately. However, filesystem internal structures might still cause issues with this operation. – Tero Kilkanen Mar 8 '17 at 14:08
1

GPT and MBR use sectors numbers to assign partitions. You need create new GPT table on new disk with partitions which have the same sizes in bytes as partitions on old disk. Then you can copy from old disk to new disk each partition:

dd if=/dev/sda1 of=/dev/sdb1 ibs=4096 obs=512 bs=16M
  • I have to point out that bs, ibs, and obs have nothing to do with the sector size. Those are merely the rates dd reads and writes bytes. Source: dd manpage – 2-bits Jan 5 at 6:25
0

I suppose you should specify 'ibs' and 'obs' parameters for 'dd' utility. For example

dd if=/dev/sda of=/dev/sdb ibs=512 obs=4096

  • tried this as well. No luck there. Same result – user404315 Mar 8 '17 at 10:55
  • Reverse parameters: ibs=4096 obs=512 bs=16M. The parameter bs will give you more speed. Read man dd command help before copy-paste. – Mikhail Khirgiy Mar 8 '17 at 12:10
  • did it with reverse parameters as well. didn't help. my final command was ibs=4096 obs=512 bs=10M. i also tried with 1 in ibs and obs. also didnt work. for some reason i am getting only one partition of type gpt – user404315 Mar 8 '17 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.