0

I have an external hard drive with two partitions: A small FAT32 which is mostly empty and works fine and a large ext4 with tons of data, most of which isn't backed up.

The ext4 is visible, but can't be mounted. I get an "error loading journal" error. The drive is a Western Digital Caviar Blue 500GB. Roughly 30GB of that is FAT32 and the rest is the ext4. The light on the enclosure turns red when reading from the bad partition. It was made by Cavalry.

There wasn't any warning, but coincidentally, I've been thinking lately that I should get two large capacity drives for real backups.

Is there anything that can be done? I'm not even sure I have enough storage to backup everything even if it is redeemable.

thekthuser
  • 111
  • 2
  • 5

2 Answers2

1

Try mounting the hard disk from the command line:

  1. Find the device name of your external hard disk. Plug it in and do: dmesg | tail -n 20.

You should see something like:

[   19.357961] scsi 8:0:2:0: Direct-Access     ATA      ST31000340AS     SD15 PQ: 0 ANSI: 5
[   19.359664] sd 8:0:2:0: Attached scsi generic sg3 type 0
[   19.360820] sd 8:0:2:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[   19.485445]  sdc1 sdc2

In my case it would be called sdc

  1. Mount partition 2 on /mnt with explicit type ext4: sudo mount -t ext4 /dev/sdc2 /mnt
Alastair McCormack
  • 2,184
  • 1
  • 15
  • 22
  • It returned "wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error" – thekthuser Oct 21 '12 at 21:03
  • dmesg | tail returns "[69425.534921] JBD: Failed to read block at offset 1 [69425.534929] JBD: recovery failed [69425.534933] EXT4-fs (sdb1): error loading journal [69428.317719] sd 15:0:0:0: [sdb] Unhandled sense code [69428.317725] sd 15:0:0:0: [sdb] Result: hostbyte=invalid driverbyte=DRIVER_SENSE [69428.317729] sd 15:0:0:0: [sdb] Sense Key : Medium Error [current] [69428.317734] sd 15:0:0:0: [sdb] Add. Sense: Unrecovered read error [69428.317739] sd 15:0:0:0: [sdb] CDB: Read(10): 28 00 1b c4 00 57 00 00 f0 00 [69428.317750] end_request: critical target error, dev sdb, sector 465829975" – thekthuser Oct 21 '12 at 21:11
  • Can you run: `file -s /dev/sdb` and `fdisk -l /dev/sdb` – Alastair McCormack Oct 21 '12 at 21:34
  • file -s /dev/sdb /dev/sdb: x86 boot sector; partition 1: ID=0x83, starthead 1, startsector 63, 935818317 sectors; partition 2: ID=0xb, starthead 254, startsector 935818380, 40949685 sectors, code offset 0xb8 – thekthuser Oct 21 '12 at 21:47
  • fdisk -l /dev/sdb Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000e9695 Device Boot Start End Blocks Id System /dev/sdb1 63 935818379 467909158+ 83 Linux /dev/sdb2 935818380 976768064 20474842+ b W95 FAT32 – thekthuser Oct 21 '12 at 21:47
  • `file -s /dev/sdb1` ? – Alastair McCormack Oct 21 '12 at 21:50
  • file -s /dev/sdb1 /dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=60a5a7a2-4c73-42d5-8d46-1682132f2100, volume name "backup" (needs journal recovery) (errors) (extents) (large files) (huge files) – thekthuser Oct 21 '12 at 22:08
  • From the dmesg output it look likes your disk has developed bad sectors. You can try @NikolaidisFotis answer and/or the fsck command that you've seen to see if you can read past the error. – Alastair McCormack Oct 21 '12 at 22:24
1

Probably your journal have been destroyed (did you have any power cut, or your disk is dying ?) A quick way to bypass it is to mount the filesystem as writeback (without journal)

mount blahblah -o data=writeback

Of course this is just a quick hack to just if my theory is corrent. for a more permanent fix, you must reset the journal {there is a chance to have some inconsistencies on the stuff you had changed right before the problem appeared)

Nikolaidis Fotis
  • 2,032
  • 11
  • 13