dd, device clone to smaller drive, no space left on device
dd
does not know anything about partitions or any other structure on the disk. It doesn't recognize "allocated" or "unallocated" parts of the disk. From dd
's point of view, a device given as parameter consists of a series of blocks. Thus, if you run dd if=/dev/sda of=/dev/sdb
, dd
will copy blocks starting from the beginning of /dev/sda
to the correspondingly numbered blocks on /dev/sdb
, until it has read all blocks from /dev/sda
or until it hits an error. In your example, because /dev/sdb
was smaller in size than /dev/sda
, dd
was terminated with the error message "No space left on device" (on /dev/sdb
).