From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-100546-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Mp9Y3-0004OB-Mk
	for garchives@archives.gentoo.org; Sat, 19 Sep 2009 23:40:59 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A432EE09A9;
	Sat, 19 Sep 2009 23:40:58 +0000 (UTC)
Received: from mail-yw0-f196.google.com (mail-yw0-f196.google.com [209.85.211.196])
	by pigeon.gentoo.org (Postfix) with ESMTP id 7E231E09A9
	for <gentoo-user@lists.gentoo.org>; Sat, 19 Sep 2009 23:40:58 +0000 (UTC)
Received: by ywh34 with SMTP id 34so2665936ywh.10
        for <gentoo-user@lists.gentoo.org>; Sat, 19 Sep 2009 16:40:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=fiofrTJJ63KHvDeyyGS79pTsOYCGHBFI7Jp0i4PaC7E=;
        b=rHSwY3/K87kM509yRuoIvjGTL09k94IvSBNloDKhAEadlVdC3nY1748NDk8yeKWNvJ
         /n2j/Q+E+l54/DT9VGXUQ+b7D5bQ6vsjFJ0XGGBIRsTn6feq5vwp/b9D8mkMZHwilNwp
         keikepg984XJO71kaHK5Q+TOEqx14TK+pJZGk=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=fAtm5UKs8mJ94gQ15jviT0ezr/E74AEIM2swfYfEiYCGklYgFzHXg/TwxKH4eEt/Hu
         ZLuIizn7h0Z/NbIVJwGPbu9+osUs/Zc3ohXwGKceIgXU1Q895Crgpmye1a7BB7sPEF04
         sd9cmAzxE1+7AChS6sOkZD45qfhEbRk+eb1bY=
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.150.114.12 with SMTP id m12mr5826221ybc.37.1253403658218; Sat, 
	19 Sep 2009 16:40:58 -0700 (PDT)
In-Reply-To: <h93oh5$2fe$1@ger.gmane.org>
References: <5bdc1c8b0909191521j72388919w35e54b577b55ae60@mail.gmail.com>
	 <5bdc1c8b0909191538h2ebf7697s742f2ee90bb9752a@mail.gmail.com>
	 <h93oh5$2fe$1@ger.gmane.org>
Date: Sat, 19 Sep 2009 16:40:58 -0700
Message-ID: <5bdc1c8b0909191640x7f04baddgc5d42622a62808a5@mail.gmail.com>
Subject: Re: [gentoo-user] Re: USB drive dead? (Commands to check?)
From: Mark Knecht <markknecht@gmail.com>
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: f7c4ba65-f33c-489c-8cc6-6536baa35a30
X-Archives-Hash: 94490481fde33737c4967472b771fd2d

On Sat, Sep 19, 2009 at 4:12 PM, walt <w41ter@gmail.com> wrote:
> On 09/19/2009 03:38 PM, Mark Knecht wrote:
>>
>> On Sat, Sep 19, 2009 at 3:21 PM, Mark Knecht<markknecht@gmail.com> =C2=
=A0wrote:
>>>
>>> Hi,
>>> =C2=A0 I seem to have lost an external USB drive I've been using on my
>>> MythTV backend server for video storage. What commands can I try to
>>> get it to wake up or at least show me what's working and what isn't?
>>> The drive shows under fdisk /dev/sda...
>
> I hate to be the party poop, but I suspect disk hardware failure.
>
> Can you use dd to read the raw disk? =C2=A0e.g.
> # dd if=3D/dev/sda of=3D/tmp/ddout bs=3D512 count=3D1024(or whatever)
>

Hi Walt,
   Don't worry about it. If it's dead it's dead.

   I've actually managed to make some headway. After fiddling around
with e2fsck -b 32768 /dev/sda1 the drive is now mountable but running
e2fsck after a reboot says the drive still has errors:

MacMini ~ # e2fsck /dev/sda1
e2fsck 1.41.3 (12-Oct-2008)
/dev/sda1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
^C/dev/sda1: e2fsck canceled.

/dev/sda1: ********** WARNING: Filesystem still has errors **********

MacMini ~ #

If I mount the drive I can actually see all the MythTV files and
amazingly they still seem to play so I don't think the drive is dead.
I got a few messages about my backup directory being hosed so I
attempted to delete it. Now the drive mounts but the sizes and things
are messed up:

MacMini ~ # mount
/dev/hda4 on / type ext3 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid,size=3D10240k,mode=3D755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=3D5,mode=3D620)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=3D0664,devgid=
=3D85)
/dev/sda1 on /video type ext3 (rw)

MacMini ~ # df /video
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            157566568  -1551528 151114116   -  /video
MacMini ~ #

MacMini ~ # ls /video/
1003_20090531163000.mpg.png  1042_20090611190000.mpg.png
1189_20090617183000.mpg.png
1003_20090603173000.mpg.png  1042_20090911210000.mpg
1189_20090619183000.mpg
1003_20090621163000.mpg.png  1042_20090911210000.mpg.png

<SNIP>

1017_20090817193000.mpg.png  1189_20090617183000.mpg               lost+fou=
nd
1042_20090611170000.mpg.png  1189_20090617183000.mpg.100x75.png
MacMini ~ #


Now, my question is how can I use the file system tools to fix all the
tables on this drive?

I see Volker is suggesting ddrescue. As it seems I've already lost the
Windows backup files but have good MYthTV files is there a way to
repair the disk tables and only end up with the existing Myth files
and clean tables? I don't have another disk to copy all this stuff to
and the MacMini is headless and PPC-based so it's difficult to use
gparted or anything like that.

I think the existing Myth files are possibly small enough that I could
store them temporarily on the Mac while I rebuild the USB drive.

Thanks,
Mark