Since last Ubuntu kernel update (actual 14.04.1 LTS with GNU/Linux 3.13.0-39-generic i686) on my server I'm noticing something strange. My system boots normally - read-writable, no problems. But after a while (day or two) it becomes "Read-only file system", and I can't change files or folders anymore. I have 3 HDD mounted into different directories, and just one of them becomes read-only - the one which is SATA2 connected through an PCIE adapter card. The other two HDD are SCSI and working fine.

dmesg lists some info for sda/sda1 which is the problematic HDD. I'm not sure how to interpret them. The HDD in question I'm using, is SATA2 through PCIE adapter, not ata3.00. It worked before the kernel update. Is there something I can try out?

[335508.395387] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0<br />
[335508.395393] ata3.00: BMDMA stat 0x44<br />
[335508.395398] ata3.00: failed command: READ DMA EXT<br />
[335508.395406] ata3.00: cmd 25/00:08:28:13:81/00:00:3e:00:00/e0 tag 0 dma 4096 in<br />
[335508.395406]          res 51/40:08:28:13:81/00:00:3e:00:00/e0 Emask 0x9 (media error)<br />
[335508.395411] ata3.00: status: { DRDY ERR }<br />
[335508.395414] ata3.00: error: { UNC }<br />
[335508.408263] ata3.00: configured for UDMA/100<br />
[335508.408283] sd 2:0:0:0: [sda] Unhandled sense code<br />
[335508.408287] sd 2:0:0:0: [sda]<br />
[335508.408290] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE<br />
[335508.408293] sd 2:0:0:0: [sda]<br />
[335508.408296] Sense Key : Medium Error [current] [descriptor]<br />
[335508.408301] Descriptor sense data with sense descriptors (in hex):<br />
[335508.408304]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00<br />
[335508.408319]         3e 81 13 28<br />
[335508.408326] sd 2:0:0:0: [sda]<br />
[335508.408331] Add. Sense: Unrecovered read error - auto reallocate failed<br />
[335508.408334] sd 2:0:0:0: [sda] CDB:<br />
[335508.408337] Read(10): 28 00 3e 81 13 28 00 00 08 00<br />
[335508.408350] end_request: I/O error, dev sda, sector 1048646440<br />
[335508.408366] ata3: EH complete<br />
[335508.408381] EXT4-fs warning (device sda1): __ext4_read_dirblock:908: error reading directory block (ino 32768161, block 0)
  • 2
    Backup that disk if you haven't already – casey Nov 16 '14 at 23:37
  • The HDD was just defect. Thanks casey, I moved some data to save it. After detaching/replacing the HDD everything went good. – Hristo Dec 20 '16 at 23:13

You should look at the output of dmesg and at the /var/log/syslog to see when this switch is happening and what messages preced it.

I have seen this happen with drives that had intermittent access problems, particularly with USB drives that had bad connectors/cables.

  • I revised the question with some dmesg output. Is there anything I can do/check to find out if some I/O module mess is happening? – Hristo Nov 16 '14 at 22:11
  • 1
    @Hristo I would first use a smartctl -a /dev/sda on that drive to see if has recurring errors. – Anthon Nov 16 '14 at 22:18
  • smartctl does not detect any errors. I dismounted the drive and used fsck on it. fsck returned that the access time is too short, maybe a zero partition. Hm, it looks like the HDD could be damaged. But on the other hand, it started exactly after I upgraded the kernel. Coincidence?! – Hristo Nov 17 '14 at 1:36
  • 1
    Hopefully your drive isn't suffering from a HW problem. Have you checked that the SATA cable is connected properly at each end, and that the adaptor card is seated properly in its slot? My SATA cable occasionally becomes slightly loose at the MB for no clear reason, but a little bit of judicious jiggling soon fixes it. Usually. It's been fine for months but now that I've mentioned it, it'll probably misbehave in the next few days. :) – PM 2Ring Nov 17 '14 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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