Ask Your Question

Encrypted disk failure

asked 2014-04-22 06:00:53 -0500

Artex gravatar image

I'm running Fedora 19, with encrypted file system, something bad happened to my disk and I'm trying to investigate, hoping to recover some data if possible.

When I got home and tried to use the computer it was frozen, a screen was displayed saying something about critical issue that could not be resolved. I could do nothing except resetting the computer. From the logs (/var/log/messages at the bottom) it seems that the operating system did not freeze instantly, it took some time after disk failures were first logged.

Can you somehow help with this? What else can I check or do to diagnose the problem and recover data? Is it failed disk or corrupted encryption?

Here is some info:

The disk is Seagate ST2000DM001 Fedora 19 running on kernel 3.13.9-100.fc19.x86_64 now, I used to have 3.12.11-201.fc19.x86_64 - I think that I did not restart the machine after the last upgrade, so the failure might have happened on the older kernel.

cryptsetup luksOpen works

cryptsetup status gives this output:

/dev/mapper/drv is active.
  type:    LUKS1
  cipher:  aes-xts-plain64
  keysize: 512 bits
  device:  /dev/sdb2
  offset:  4096 sectors
  size:    2824892416 sectors
  mode:    read/write

Fdisk -l:

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00066f58

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    33556479    16777216   82  Linux swap / Solaris
/dev/sdb2        33556480  2858452991  1412448256   83  Linux
/dev/sdb3      2858452992  3907028991   524288000    7  HPFS/NTFS/exFAT

Trying to mount:

mount: /dev/mapper/drv is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/mapper/drv,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

dmesg during mount:

[ 4316.552531] ata2.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0
[ 4316.556339] ata2.00: irq_stat 0x40000008
[ 4316.560132] ata2.00: failed command: READ FPDMA QUEUED
[ 4316.564049] ata2.00: cmd 60/08:00:f8:18:00/00:00:02:00:00/40 tag 0 ncq 4096 in
         res 41/40:08:f8:18:00/00:00:02:00:00/00 Emask 0x409 (media error) <F>
[ 4316.572067] ata2.00: status: { DRDY ERR }
[ 4316.576152] ata2.00: error: { UNC }
[ 4316.581936] ata2.00: configured for UDMA/133
[ 4316.581946] sd 1:0:0:0: [sdb] Unhandled sense code
[ 4316.581947] sd 1:0:0:0: [sdb]  
[ 4316.581948] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 4316.581949] sd 1:0:0:0: [sdb]  
[ 4316.581950] Sense Key : Medium Error [current] [descriptor]
[ 4316.581952] Descriptor sense data with sense descriptors (in hex):
[ 4316.581953]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 
[ 4316.581956]         02 00 18 f8 
[ 4316.581958] sd 1:0:0:0: [sdb]  
[ 4316 ...
edit retag flag offensive close merge delete


Share all this information with Seagate, I'm sure they will replace your drive. Data recovery might be possible, but probably very exensive. I'd start with ddresche, and if it didn't produce anything usable, call it a loss.

randomuser gravatar imagerandomuser ( 2014-04-22 07:34:19 -0500 )edit

Thanks for the suggestion of ddrescue, it seems to be a great tool. Unfortunately, before I read through manual things with my disk has gotten worse, now BIOS reports disk failure and after I boot into OS I can see the device, but cannot do anything with it: fdisk reports failures and does not print partition table and ddrescue reports that it cannot start at position X (which I set with --input-position to a start of the partition I wanted to rescue) because the device is smaller. I guess it's a total failure now :-/

Artex gravatar imageArtex ( 2014-04-26 16:15:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-05-15 21:46:34 -0500

sparks gravatar image

Looks like you've already gotten your answer WRT it being a disk failure. It's rarely going to be an encryption issue since the key is being used since you unlocked it after boot and, depending on what partitions you have encrypted, is basically being used constantly for read and write. Using encryption does add a layer of confusion since you can't manipulate a LUKS partition as straight forward as maybe a EXT4 partition.

Sorry your drive failed. Those things happen. Hope you had a backup!

edit flag offensive delete link more

Question Tools


Asked: 2014-04-22 06:00:53 -0500

Seen: 733 times

Last updated: May 15 '14