Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Server with 2 HDDs in soft RAID 1, the OS is Debian Wheezy. After some database testing, the file system has gone to read-only mode, after which I have rebooted the machine. The server is not starting again, so I have booted a rescue system to look after the HDDs.

Now the problems start: fdisk -l is giving no output, and fdisk /dev/sda says Unable to read /dev/sda, while smartctl -a gives me a SMART overall-health self-assessment test result: PASSED. All the problems occur with /dev/sdb as well.

mdadm isn't helpful as well:

mdadm: no recogniseable superblock on /dev/sda
mdadm: /dev/sda has no superblock - assembly aborted

Output from dmesg:

ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata5.00: irq_stat 0x40000001
ata5.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
res 61/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
ata5.00: SB600 AHCI: limiting to 255 sectors per cmd
ata5.00: SB600 AHCI: limiting to 255 sectors per cmd
ata5.00: configured for UDMA/133
ata5: EH complete

testdisk is listing the drives with the correct size, but when I am trying to test the disk, every block is return a read error:

file_pread(4,2,buffer,34(0/0/35)) read err: Input/output error
file_pread(4,8,buffer,32(0/0/33)) read err: Input/output error
file_pread(4,8,buffer,40(0/0/41)) read err: Input/output error
file_pread(4,3,buffer,48(0/0/49)) read err: Input/output error

I am a bit puzzled, because I doubt that both disks have died at the same time and I suspect, that the SATA-controller may have some problems. How can I test this? And what else can I check?

share|improve this question
Under normal conditions /dev/sda cannot be a MD base device thus it's not surprising that mdadm doesn't find a superblock. Does fdisk -l /dev/sdb give usable output? What happens if you execute dd if=/dev/sda of=/dev/null count=1? – Hauke Laging May 17 '13 at 12:52
Show the smartctl results in your question. – psusi May 17 '13 at 13:07
@psusi If just the MBR sector broke then SMART will probably not detect that. – Hauke Laging May 17 '13 at 13:20
@HaukeLaging, of course it will? – psusi May 17 '13 at 14:28
@psusi OK, that was bad wording (maybe even party bad thinking): SMART will notice one failed sector and increase that counter but it will not treat that as a severe error, will not report the disk as failing or the like. I assume that SMART treats the MBR like any other sector. It broke and gets remapped when written. But as it is the MBR this error though irrelevant to the disk crashes the whole system. – Hauke Laging May 17 '13 at 14:33

First of all, I would recommend to rebuild the array with the second hard disk and make a backup if you don't have one. Probably something like that:

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 missing

Then after exchanging the first hard disk, you should be able to copy the partition table

sfdisk -d /dev/sdb | sfdisk /dev/sda

and add the new harddrive to the array again

mdadm --manage /dev/md0 --fail /dev/sda1
mdadm --manage /dev/md0 --remove /dev/sda1
mdadm --manage /dev/md0 --add /dev/sda1

If you have more than one partition just do this for all partitions (marking faulty and removing)

share|improve this answer
Oh, I guess I haven't made it clear enough that I have the same problem with both disks. /dev/sdb isn't reading any blocks either. – Thomas Skowron May 17 '13 at 12:20
Oh OK, I thought there is only one hard disk effected. My bad. Do you have any possibility to check them in another server? I would say as well, very unlikely that both hard drives crash at the same time and you're not able too read from one of them. Could be just a faulty controller / hardware error. – Meiko Watu May 17 '13 at 12:50
up vote 0 down vote accepted

It turned out that there was no problem with the HDDs neither with the controller. It was... the SATA cable.

Lesson for me (and everybody else): Before trying everything and wasting hours of time, first check the very obvious things.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.