3

I am using dd command to copy disk drive /dev/sda on /dev/sdb. What I do is the following: I run

  1. dd if=/dev/sda of=/dev/sdb
  2. then mount /dev/sdb1 (note that /dev/sdb1 is not mounted on boot) to make sure that everything is there.

This works fine.

Then I make some changes on /dev/sda and try to copy the disk again. So I umount /dev/sdb and issue the same command (dd if=/dev/sda of=/dev/sdb).

After I mount /dev/sdb1 again the intermediate changes are not reflected on /dev/sdb and the state of /dev/sdb is the same as it was after the first mount of /dev/sdb1.

I am using ext3. Maybe the metadata gets corrupted or I just have to restart the system? Or maybe there is something to do with the journal. Could you please tell me what is causing the problem and how can I fix it?

1 Answers1

1

Judging by your question /dev/sda1 is a mounted disk and using dd in this manner will most likely get you a corrupted copy as dd doesn't properly handle writes in progress.

More information is here in an answer to a question on serverfault.