Greg Lane
2006-Jun-12 05:51 UTC
kernel panic(?) trying to copy data off failed drive with dd
G'day everyone, I have a 250 GB SATA disk with one regular FreeBSD parition that is obviously in some distress. I can mount the partition, but any attempt to fsck it gives (I think) a kernel panic. I say I think because sometimes it hangs forever, sometimes it reboots. One of the panic messages (at one point or another, sorry I can't be precise) was in "initiate_write_inodeblock_ufs2". Errors on the console have been like "FAILURE read_dma timed out" etc. When it hangs, the console doesn't always give an error, it just hangs. I commented out the drive in fstab so I could boot and started to dd the entire disk to an image so that I can try and mount the image, fsck it and salvage what I can. However, when I get to the bad parts of the disk the machine hangs. I copied the first 160 GB or so, then it hung. I have since recopied the first part of the disk and am trying to get the last part. Recently I have been trying: dd if=/dev/ad4s1d conv=noerror,sync bs=512 skip=333184000 of=data1-image-p2 I was hoping noerror would skip over the bad parts of the disk, but the machine invariably hangs. (1) Is there anyway to stop it hanging on bad reads of the disk and just return an error, which noerror can skip over? I am perfectly willing to patch the kernel or whatever it takes to get this working. While I have a backup, it is a month or so old. I can invest some time now to save having to regenerate the last month's work. (Fortunately this is the less active disk! I have two other 250GB drives which would have been far worse to lose. They are now backed up to the present day!) (2) Will dump/restore help me? Will dump skip over the errors any better? Do I need an fsck'ed file system before I dump? It seems to my uneducated eye that this is a read error that hangs the kernel before it ever gets passed to the user program (dd) so dump/restore will work no better. But I don't really no. The machine is running 5.5 pre-release. I can pull the disk and put it in a machine running 6-stable if that will help. I could also install current on some box or another. Whatever will get the data back!! Advice please?!? Cheers, Greg
Miroslav Lachman
2006-Jun-12 09:18 UTC
kernel panic(?) trying to copy data off failed drive with dd
Greg Lane wrote: [...]> The machine is running 5.5 pre-release. I can pull the disk and put it > in a machine running 6-stable if that will help. I could also install > current on some box or another. Whatever will get the data back!! > > Advice please?!? > > Cheers, > GregMaybe you can try /usr/ports/sysutils/cpdup which can skip read errors. I used cpdup few years ago on HDD with bad sectors with success - lose only few unreadable files from the middle of disk. Miroslav Lachman
Michael P. Soulier
2006-Jun-12 10:48 UTC
kernel panic(?) trying to copy data off failed drive with dd
On 12/06/06 Miroslav Lachman said:> Greg Lane wrote: > [...] > >The machine is running 5.5 pre-release. I can pull the disk and put it > >in a machine running 6-stable if that will help. I could also install > >current on some box or another. Whatever will get the data back!! > > > >Advice please?!? > > Maybe you can try /usr/ports/sysutils/cpdup which can skip read errors. > I used cpdup few years ago on HDD with bad sectors with success - lose > only few unreadable files from the middle of disk.Regardless, file a bug report. The box should never hang, or reboot. Mike -- Michael P. Soulier <msoulier@digitaltorque.ca> "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060612/a1815cee/attachment.pgp
Greg Lane
2006-Jun-12 11:37 UTC
kernel panic(?) trying to copy data off failed drive with dd
On Mon, Jun 12, 2006 at 11:16:28AM +0200, Miroslav Lachman <000.fbsd@quip.cz> wrote:> >Advice please?!? > > Maybe you can try /usr/ports/sysutils/cpdup which can skip read errors. > I used cpdup few years ago on HDD with bad sectors with success - lose > only few unreadable files from the middle of disk.I am installing that right now and will give it a try in the morning when I am sitting next to it. I want to keep the machine alive overnight while I copy some other stuff over the network to another machine, since I may take this opportunity (replacing the disk) to upgrade to 6-stable. Thanks, Greg