On Mar 7, 2011, at 1:58 AM, Markus Hitter wrote:

> 
> Am 06.03.2011 um 15:28 schrieb Ashley Aitken:
> 
>> I could not use Disk Utility to do a block copy of this disk (for some 
>> reason it would stop and hang the app or machine part way through).  This 
>> was during the hot period and the disk could have been overheating during 
>> the operation
> 
> If the disk is subject to overheating, get it cooled. Often this is a simple 
> as unmounting it from the housing and let it dangling in fresh air. Not a 
> long term solution, of course, but totally sufficient for doing a copy. 
> Cooling a disk usually usually makes it operational again.
> 
> Copying the raw device with "dd" is a good idea, as this reduces reading head 
> movement to a minimum. IIRC, copying a raw device to a file gives you 
> something you can convert with diskutil to a valid DMG. Please don't nail me 
> down to the details, it's quite some time since I've done that last time.
> 
> If the disk still overheats, you can use "dd" to copy in smaller chunks. Read 
> 10 MB, sleep a second, repeat. Takes some time, but gives reliable results.
> 
> In the worst case, you have to instruct "dd" to fill sectors with read 
> failure with zeroes. So you loose only a few single sectors instead of entire 
> files. Beware, "dd" simply drops sectors with read failure by default, making 
> the copy useless. But there are switches to avoid that.

See thread "Mac OS vs Fedora disk performance" I am seeing a HUGE difference in 
dd performance between the block device /dev/disk0 and the raw device 
/dev/rdisk0. I know using something like:

dd if=/dev/disk0 of=/dev/disk1s2/diskimages/imageofhotharddrive.iso bs=256k

will produce a valid ISO that you can mount and traverse the files. It will 
contain the full partition map, directory, everything. I have not tried using 
the raw device:

dd if=/dev/rdisk0 of=/dev/disk1s2/diskimages/imageofhotharddrive.iso bs=256k

This would be 6x faster on my machine, but I don't know the difference with XNU 
between block level and raw device other than performance. Obviously I would 
prefer to use rdisk because it is way faster. But I don't know what the result 
is.

I like the idea of yanking the drive, letting it hang out, and doing a dd with 
the raw /dev/rdiskX and then inspecting the resulting iso. If it even mounts 
and is navigable, you're set, although you could try launching an executable to 
be sure - or using md5 on two files to ensure they're identical. It's a sector 
copy so I don't see why they would not be. If it turns out it's not usable, 
then you could revert to the block level /dev/diskX and retry...worth trying to 
go faster than slower.


Chris Murphy_______________________________________________
MacOSX-admin mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Reply via email to