1

I want to clopy a partition between SSD devices. Normally I could do it simply with the "dd" or "buffer" commands.

However, now that I have SSDs, I also would like to miss the unneeded writes.

I want all all-zero blocks handled as trimmed blocks.

Is there, ideally a command line tool, to do that?

1 Answer 1

2

You can do this in two steps:

  • discard the contents of the target device (so that reads return zero):

    blkdiscard /dev/sdT1
    
  • copy the data, skipping instead of writing zero blocks (using GNU dd):

    dd bs=100M iflag=fullblock conv=sparse if=/dev/sdS1 of=/dev/sdT1
    

replacing S1 (source) and T1 (target) as appropriate.

1
  • what's the significance of the magic number 100M ? Commented 4 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.