1 |
On Sunday 15 May 2011 08:45:05 Adam Carter wrote: |
2 |
> I'm cloning a windows disk using gentoo; |
3 |
> |
4 |
> On the old 66GB disk; |
5 |
> # dd if=/dev/sdb of=/root/winmbr.bin bs=512 count=1 |
6 |
> # dd if=/dev/sdb1 bs=10M | gzip -v > winpartition.gz |
7 |
> |
8 |
> Then after swapping in the new 500GB disk; |
9 |
> dd if=/root/winmbr.bin of=/dev/sdb bs=512 count=1 |
10 |
> # gunzip -c winpartition.gz | dd of=/dev/sdb1 bs=10M |
11 |
> dd: writing `/dev/sdb1': No space left on device |
12 |
> 0+306 records in |
13 |
> 0+305 records out |
14 |
> 10137600 bytes (10 MB) copied, 0.109885 s, 92.3 MB/s |
15 |
> # fdisk -l /dev/sdb |
16 |
> |
17 |
> Disk /dev/sdb: 500.1 GB, 500107862016 bytes |
18 |
> 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors |
19 |
> Units = sectors of 1 * 512 = 512 bytes |
20 |
> Sector size (logical/physical): 512 bytes / 512 bytes |
21 |
> I/O size (minimum/optimal): 512 bytes / 512 bytes |
22 |
> Disk identifier: 0xe3f7e3f7 |
23 |
> |
24 |
> Device Boot Start End Blocks Id System |
25 |
> /dev/sdb1 * 206848 117207039 58500096 7 HPFS/NTFS/exFAT |
26 |
> |
27 |
> Why is dd saying no space left after copying 10MB when sdb1 is 65GB? |
28 |
|
29 |
Not sure if the bs=10M is too large? |
30 |
|
31 |
You can try finding the optimum size of the bs= value by creating a partition |
32 |
on the new disk, formating it and then run something like: |
33 |
|
34 |
dd if=/dev/zero bs=1024 count=1000000 of=/1G_test.file |
35 |
dd if=/dev/zero bs=2048 count=500000 of=/1G_test.file |
36 |
dd if=/dev/zero bs=4096 count=250000 of=/1G_test.file |
37 |
dd if=/dev/zero bs=8192 count=125000 of=/1G_test.file |
38 |
|
39 |
and compare the results that dd reports. bs=4096 often gives best performance |
40 |
(on my drives at least) but with the new 1T+ drives you may find that another |
41 |
block size does the job better. |
42 |
|
43 |
Then zero the drive first using dd: |
44 |
|
45 |
dd if=/dev/zero of=/dev/sdb bs=4096 oflag=direct conv=notrunc |
46 |
|
47 |
and try repeating your restoring from back up with a more suitable block size. |
48 |
-- |
49 |
Regards, |
50 |
Mick |