[sclug] Copy drive problem

Neil Haughton haughtonomous at googlemail.com
Sat Mar 2 17:02:10 UTC 2013


On 1 March 2013 18:35, Alex Butcher <lug at assursys.co.uk> wrote:

> On Fri, 1 Mar 2013, Neil Haughton wrote:
>
>  On Mar 1, 2013 5:02 PM, "Alex Butcher" <lug at assursys.co.uk> wrote:
>> >
>> > On Fri, 1 Mar 2013, Neil Haughton wrote:
>> >
>> >> Then I tried as root to 'dd' the sdb1 partition (/var)  to its new
>> home:
>> >>
>> >> dd if=/dev/sdb1 of=/dev/sdc1
>> >>
>> >> After a long pause the message 'read error' appeared and dd bombed out,
>> >> with only a couple of MB transferred.  Why would this be? Have I done
>> >> anything wrong or missed out a vital step?
>> >
>> >
>> > Sounds like /dev/sdb has developed a bad block or two. You'll need to
>> write
>> > to the block(s) in question to force the drive's firmware to reallocate
>> them
>> > if it's a hard error.
>>
>
> ...and obviously, the implication is that whatever data once occupied the
> block(s) in question is gone now. Hopefully, it was nothing important.
>
>
>  > Alternatively, restore from backups onto /dev/sdc1. You do have backups,
>> > right?!? ;-)
>>
>> Not of  this partition, which contains /var only.
>>
>
> HTH,
> Alex


I've managed to fdisk both partitions and fixed the two bad blocks (in
sdb1), and dd'd them to their new counterparts. Here's a puzzle: sdb is
only a 40GB drive whereas the new sdc is 320GB. Both have a 3GB first
partition, but having dd'd the second partition across I find that sdc2
(approx 327GB) is now being shown in gparted as 76% used! How is that? Why
does the new partition apparently have over 200GB of data when the source
partition had only 37GB at most (actually a lot less)?

The command I used was

dd iflag=nofollow if=/dev/sdb2 of=/dev/sdc2

I used the iflag argument because I didn't want symlinks to my external
drive to be followed. What is occupying all the extra space?

TIA
Neil



More information about the Sclug mailing list