LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-21-2006, 05:22 AM   #1
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
How to clear wrong ext2/3 filesystem descriptor ?


Hello,

I have a problem automounting an external USB harddrive. In fact I (almost certainly...) know how I created the problem but have no idea how to solve it.

When I first partitionned the hard drive, I made only one partition on the entire disk (/dev/sdd1). When I created the filesystem with mke2fs, I accidentaly tried to create it on the entire disk (/dev/sdd) rather than on the partition (/dev/sdd1). There was a warning that this would cause problem but I pressed 'yes' too fast.

I then normally created my filesystem on the partition. Now my disk works without problem and I can use my partition to read/writte data. The only thing that puzzle me off is that I always get an error in gnome when I plug the disk and it gets automounted. The error box states: "Cannot Mount Volume: Unable to mount volume" (which is a really informative error message by the way....). Meanwhile, my ext3 partition is automounted without any problem. Same thing if I unmount/remount the partition manually as root from a terminal.

In fact gnome (or whatever hal/automount program in the background). Is trying to mount both the partition and the entire disk as ext3 filesystem, the later leading to an error. Here is the output of my /var/log/messages.

Code:
Jun 21 11:56:46 home kernel: usb 2-2.1: new high speed USB device using ehci_hcd and address 4
Jun 21 11:56:46 home kernel: usb 2-2.1: configuration #1 chosen from 1 choice
Jun 21 11:56:46 home kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Jun 21 11:56:51 home kernel:   Vendor: Maxtor    Model: 6Y160P0           Rev: YAR4
Jun 21 11:56:51 home kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jun 21 11:56:51 home kernel: SCSI device sdd: 320173056 512-byte hdwr sectors (163929 MB)
Jun 21 11:56:51 home kernel: sdd: Write Protect is off
Jun 21 11:56:51 home kernel: sdd: assuming drive cache: write through
Jun 21 11:56:51 home kernel: SCSI device sdd: 320173056 512-byte hdwr sectors (163929 MB)
Jun 21 11:56:51 home kernel: sdd: Write Protect is off
Jun 21 11:56:51 home kernel: sdd: assuming drive cache: write through
Jun 21 11:56:51 home kernel:  sdd: sdd1
Jun 21 11:56:51 home kernel: sd 3:0:0:0: Attached scsi disk sdd
Jun 21 11:56:51 home kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Jun 21 11:56:51 home kernel: EXT2-fs error (device sdd): ext2_check_descriptors: Block bitmap for group 880 not in group (block 0)!
Jun 21 11:56:51 home kernel: EXT2-fs: group descriptors corrupted!
Jun 21 11:56:52 home kernel: kjournald starting.  Commit interval 5 seconds
Jun 21 11:56:52 home kernel: EXT3 FS on sdd1, internal journal
Jun 21 11:56:52 home kernel: EXT3-fs: mounted filesystem with ordered data mode.
So my question is: how do I "clear" this bogus filesystem descriptor on the entire disk so that gnome does not try to automount it without whiping out the entire disk and start everything other ?

Thanks in advance.
 
Old 06-21-2006, 06:17 AM   #2
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
run /sbin/e2fsck and /sbin/reside2fs on it, no guarenees this will fix it though...
 
Old 06-21-2006, 09:05 AM   #3
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Original Poster
Rep: Reputation: 30
Ok now it's worse....

e2fsck never completed (or at least not fast enough...). I got out of it and now my usb disk is not recognized anymore. When I turn the disk on, the activity led flashes for ages (arround 2 or 3 minutes). This is what I get in my log:
Code:
Jun 21 15:59:49 home kernel: usb 2-2.4: new high speed USB device using ehci_hcd and address 5
Jun 21 15:59:49 home kernel: usb 2-2.4: configuration #1 chosen from 1 choice
Jun 21 15:59:49 home kernel: scsi4 : SCSI emulation for USB Mass Storage devicesJun 21 15:59:54 home kernel:   Vendor: Maxtor    Model: 6Y160P0           Rev: YAR4
Jun 21 15:59:54 home kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jun 21 15:59:54 home kernel: SCSI device sdc: 320173056 512-byte hdwr sectors (163929 MB)
Jun 21 15:59:54 home kernel: sdc: Write Protect is off
Jun 21 15:59:54 home kernel: sdc: assuming drive cache: write through
Jun 21 15:59:54 home kernel: SCSI device sdc: 320173056 512-byte hdwr sectors (163929 MB)
Jun 21 15:59:54 home kernel: sdc: Write Protect is off
Jun 21 15:59:54 home kernel: sdc: assuming drive cache: write through
Jun 21 15:59:58 home udevd-event[3227]: wait_for_sysfs: waiting for '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-2/2-2.4/2-2.4:1.0/host4/target4:0:0/4:0:0:0/bus' failed
Jun 21 16:00:02 home kernel:  sdc:<6>sd 4:0:0:0: SCSI error: return code = 0x8000002
Jun 21 16:00:02 home kernel: sdc: Current: sense key: Medium Error
Jun 21 16:00:02 home kernel:     Additional sense: Unrecovered read error
Jun 21 16:00:02 home kernel: end_request: I/O error, dev sdc, sector 0
Jun 21 16:00:02 home kernel: Buffer I/O error on device sdc, logical block 0
Jun 21 16:00:10 home kernel: sd 4:0:0:0: SCSI error: return code = 0x8000002
Jun 21 16:00:10 home kernel: sdc: Current: sense key: Medium Error
Jun 21 16:00:10 home kernel:     Additional sense: Unrecovered read error
Jun 21 16:00:10 home kernel: end_request: I/O error, dev sdc, sector 0
Jun 21 16:00:10 home kernel: Buffer I/O error on device sdc, logical block 0
Jun 21 16:00:18 home kernel: sd 4:0:0:0: SCSI error: return code = 0x8000002
Jun 21 16:00:18 home kernel: sdc: Current: sense key: Medium Error
Jun 21 16:00:18 home kernel:     Additional sense: Unrecovered read error
Jun 21 16:00:18 home kernel: end_request: I/O error, dev sdc, sector 0
Jun 21 16:00:18 home kernel: Buffer I/O error on device sdc, logical block 0
Jun 21 16:00:18 home kernel:  unable to read partition table
Jun 21 16:00:18 home kernel: sd 4:0:0:0: Attached scsi disk sdc
Jun 21 16:00:18 home kernel: sd 4:0:0:0: Attached scsi generic sg3 type 0
Jun 21 16:00:26 home kernel: sd 4:0:0:0: SCSI error: return code = 0x8000002
Jun 21 16:00:26 home kernel: sdc: Current: sense key: Medium Error
Jun 21 16:00:26 home kernel:     Additional sense: Unrecovered read error
Jun 21 16:00:26 home kernel: end_request: I/O error, dev sdc, sector 0
Jun 21 16:00:26 home kernel: Buffer I/O error on device sdc, logical block 0
Jun 21 16:00:34 home kernel: sd 4:0:0:0: SCSI error: return code = 0x8000002
Jun 21 16:00:34 home kernel: sdc: Current: sense key: Medium Error
Jun 21 16:00:34 home kernel:     Additional sense: Unrecovered read error
Jun 21 16:00:34 home kernel: end_request: I/O error, dev sdc, sector 0
...
The last 5 lines are repeated over and over until the activity led stops flashing. I get no device in /dev so I can't even access my disk with fdisk to repartition it.

Any help to get my disk back (even blank) gratelly appreciated...

Last edited by zeitounator; 06-21-2006 at 09:14 AM.
 
Old 06-21-2006, 09:20 AM   #4
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
um, you do umount the disk before running these tools dont you? that is a standard tnhing to do when manipulating disk partitions in all *nix & *bsd OSs
 
Old 06-21-2006, 09:26 AM   #5
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Original Poster
Rep: Reputation: 30
I can't mount/umount nor manipulate anything since I can't access my disk at all... No device node is created under /dev/
 
Old 06-25-2006, 04:29 PM   #6
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Original Poster
Rep: Reputation: 30
Just to share the magic...

I saw an entry in /proc/partition concerning my disk. I was able to manually make a device node with mknod using the major and minor number given there (mknod nodeFile b <major> <minor>) but was still unable to perform any fdisk nor fsck with the same error message given in my log about an I/O error on sector 0. QTParted wasn't of any help either.

I also tried to zero the first sector of the drive with dd and still got I/O errors. With some T&E I was able to find out that the problem was situated on the first 8 block of the drive (dd bs=512 if=/dev/sdc of=testdump skip=x count=y - I incremented x by one starting from 0 until I got no error). Unfortunately, I had no other hard drive to copy the entire content and try to rescue.

I was about to give up when I heard somewhere in the cyberspace about a software called spinrite. I was able to get version 6, launched the installer program with wine which gave me the option to create a bootable iso image on my system disk. I burned that image to a cd, booted from there and launched an automatic repair of the drive. It came out that 2 sectors where dead and unrecovered (sector 0 and one other).

Once all scan and repair was finished (approximately 2h30 that I used to drive all my familly to the nearest beach, take a bath and come back...), I rebooted my machine. The device node was there in /dev/. I tried fdisk who decided to start warning me there was no partition on the drive. I created a linux partition on the entire disk and wrote the changes on the drive. As soon as the new partition table was re-read, my entire old filesystem was automagically mounted and appeared on my desktop with apparently all my data there !!!! And guess what, the original error is gone: the drive now mounts firing absolutely no error.

So I decided to have a beer. But I have the feeling I should also buy a new external hard drive soon.

Good night all.

Last edited by zeitounator; 06-25-2006 at 04:31 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
EXT2 -fs warning (device sda1): ext2_fill_super:mounting ext3 filesystem as ext2 snakeo2 Linux - Newbie 6 11-19-2006 07:35 PM
ext2 filesystem error Amolbhagwat Linux - Software 2 01-23-2006 09:38 AM
ext3\ext2 filesystem amjad Linux - General 1 05-23-2005 04:51 AM
About ext2 filesystem creation 7ux_spirit Linux - Newbie 1 04-30-2004 02:23 PM
Ext2 Filesystem in RAM Fernando Linux - General 0 03-21-2002 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration