Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: USB drive dead? (Commands to check?)
Date: Sat, 19 Sep 2009 23:40:59
Message-Id: 5bdc1c8b0909191640x7f04baddgc5d42622a62808a5@mail.gmail.com
In Reply to: [gentoo-user] Re: USB drive dead? (Commands to check?) by walt
1 On Sat, Sep 19, 2009 at 4:12 PM, walt <w41ter@×××××.com> wrote:
2 > On 09/19/2009 03:38 PM, Mark Knecht wrote:
3 >>
4 >> On Sat, Sep 19, 2009 at 3:21 PM, Mark Knecht<markknecht@×××××.com>  wrote:
5 >>>
6 >>> Hi,
7 >>>   I seem to have lost an external USB drive I've been using on my
8 >>> MythTV backend server for video storage. What commands can I try to
9 >>> get it to wake up or at least show me what's working and what isn't?
10 >>> The drive shows under fdisk /dev/sda...
11 >
12 > I hate to be the party poop, but I suspect disk hardware failure.
13 >
14 > Can you use dd to read the raw disk?  e.g.
15 > # dd if=/dev/sda of=/tmp/ddout bs=512 count=1024(or whatever)
16 >
17
18 Hi Walt,
19 Don't worry about it. If it's dead it's dead.
20
21 I've actually managed to make some headway. After fiddling around
22 with e2fsck -b 32768 /dev/sda1 the drive is now mountable but running
23 e2fsck after a reboot says the drive still has errors:
24
25 MacMini ~ # e2fsck /dev/sda1
26 e2fsck 1.41.3 (12-Oct-2008)
27 /dev/sda1 contains a file system with errors, check forced.
28 Pass 1: Checking inodes, blocks, and sizes
29 ^C/dev/sda1: e2fsck canceled.
30
31 /dev/sda1: ********** WARNING: Filesystem still has errors **********
32
33 MacMini ~ #
34
35 If I mount the drive I can actually see all the MythTV files and
36 amazingly they still seem to play so I don't think the drive is dead.
37 I got a few messages about my backup directory being hosed so I
38 attempted to delete it. Now the drive mounts but the sizes and things
39 are messed up:
40
41 MacMini ~ # mount
42 /dev/hda4 on / type ext3 (rw,noatime)
43 proc on /proc type proc (rw,nosuid,nodev,noexec)
44 sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
45 udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755)
46 devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620)
47 shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
48 usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
49 /dev/sda1 on /video type ext3 (rw)
50
51 MacMini ~ # df /video
52 Filesystem 1K-blocks Used Available Use% Mounted on
53 /dev/sda1 157566568 -1551528 151114116 - /video
54 MacMini ~ #
55
56 MacMini ~ # ls /video/
57 1003_20090531163000.mpg.png 1042_20090611190000.mpg.png
58 1189_20090617183000.mpg.png
59 1003_20090603173000.mpg.png 1042_20090911210000.mpg
60 1189_20090619183000.mpg
61 1003_20090621163000.mpg.png 1042_20090911210000.mpg.png
62
63 <SNIP>
64
65 1017_20090817193000.mpg.png 1189_20090617183000.mpg lost+found
66 1042_20090611170000.mpg.png 1189_20090617183000.mpg.100x75.png
67 MacMini ~ #
68
69
70 Now, my question is how can I use the file system tools to fix all the
71 tables on this drive?
72
73 I see Volker is suggesting ddrescue. As it seems I've already lost the
74 Windows backup files but have good MYthTV files is there a way to
75 repair the disk tables and only end up with the existing Myth files
76 and clean tables? I don't have another disk to copy all this stuff to
77 and the MacMini is headless and PPC-based so it's difficult to use
78 gparted or anything like that.
79
80 I think the existing Myth files are possibly small enough that I could
81 store them temporarily on the Mac while I rebuild the USB drive.
82
83 Thanks,
84 Mark

Replies

Subject Author
Re: [gentoo-user] Re: USB drive dead? (Commands to check?) Volker Armin Hemmann <volkerarmin@××××××××××.com>