dd question, what am I doing wrong?

Patrick O'Callaghan pocallaghan at gmail.com
Fri Dec 4 21:57:34 UTC 2009


On Fri, 2009-12-04 at 13:42 -0800, Daniel B. Thurman wrote:
> BEFORE:
> Disk1: partition#1: psize=100G, size=97.65G, used=91.23G, unused=6.42G
> Disk2: partition#1: psize=250G, size=244.14G (newly formatted)
> 
> I did a dd if=/dev/sda1 of=/dev/sdb1
> 
> AFTER:
> Disk1: partition#1: psize=100G, size=97.65G, used=91.23G, unused=6.42G
> Disk2: partition#1: psize=250G, size=244.14G, used=237.72G,
> unused=6.42G
> 
> WTF...

You seem to have a misconception about what dd is for. It just copies
data from A to B with no interpretation at all. In this case dd copied
the entire contents of Disk1 to Disk1, including all the system
meta-information (superblock, inode list, free list etc.), but since
partition table info is not part of that data (it's held on a different
part of the disk), Disk2's partition layout didn't change. So Disk 2 now
has a filesystem sitting on it that has a lot of physical free space at
the end which it doesn't know about. It needs to be resized, e.g. with
gparted.

poc





More information about the fedora-list mailing list