Status drdy err linux

Status drdy err linux

Поймал на одном своих немолодых HDD (Power_On_Hours = 28397) проблему с запуском, сопровождающуюся ошибкой:
ata2.01: status:

Подцепив диск к соседнему хосту при обращении к нему в dmesg нарисовалось следующее:

[ 956.085746] ata5.00: status: < DRDY ERR >[ 956.085748] ata5.00: error: < UNC >[ 956.087466] ata5.00: configured for UDMA/133 [ 956.087482] sd 4:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 956.087487] sd 4:0:0:0: [sda] tag#0 Sense Key : Medium Error [current] [descriptor] [ 956.087490] sd 4:0:0:0: [sda] tag#0 Add. Sense: Unrecovered read error - auto reallocate failed [ 956.087494] sd 4:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 08 08 00 00 08 00 [ 956.087497] blk_update_request: I/O error, dev sda, sector 2063 [ 956.087501] Buffer I/O error on dev sda1, logical block 1, async page read [ 956.087515] ata5: EH complete [ 958.227390] ata5.00: exception Emask 0x0 SAct 0x1000000 SErr 0x0 action 0x0 [ 958.227405] ata5.00: irq_stat 0x40000008 [ 958.227409] ata5.00: failed command: READ FPDMA QUEUED [ 958.227414] ata5.00: cmd 60/08:c0:08:08:00/00:00:00:00:00/40 tag 24 ncq 4096 in res 41/40:00:0f:08:00/00:00:00:00:00/40 Emask 0x409 (media error) [ 958.227454]blk_update_request: I/O error, dev sda, sector 4110 [ 958.227477] Buffer I/O error on dev sda1, logical block 1, async page read 
 -- -- -- -- -- -- -- 40 51 00 0e 10 00 40 Error: UNC at LBA = 0x0000100e = 4110

Исходя из соображения что 2063-й и 4110 сектор при его размере в 512 байт уже не относится к таблице разделов а по порядку находится где то в начале второго ((((2063*512)/1024)/1024)=1.007324) и третьего((((4110*512)/1024)/1024)=2.006836) мегабайта (и mbr зацепить не должен) было решено откусить несколько мегабайт в начале, чтоб дать шанс железке героически скончаться при исполнении служебных подвигов (разумеется без хранения критичной инфы в единичном экземпляре), а не подвергнуться забвению на полке

После этой несложной арифметики, забил его файлом с нулями ( dd ) для проверки не всплывут ли еще сбои — Все прошло успешно.
Ничего сверхестественного, но может кому-то придется полезным. Если бы проблемные сектора всплыли в середине диска — можно оставить неразмеченную область между разделами там

Источник

DRDY ERR from HDD

All of a sudden I started getting the DRDY ERR with my laptop running linux..some messages look like..

 ata1:00: status: < DRDY ERR >ata1.00: error ata1:00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 ata1:00: BMDMA stat 0x25 ata1:00: failed command: READ DMA 
 INIT: no more processes left in this runlevel 

Suspecting a HDD crash, I took it out and used in another PC as an external USB HDD drive and I was able to mount & see all partitions and files within. So I assume Disc is OK. [EDIT/UPDATE] I’m also able to boot into the laptop from a USB pen drive with linux) and even able to see all the partitions on the disk and access them. Also took out the HDD and put it in a external casing and tried booting into the same laptop but got following different errors

 end_request: critical target error, dev sda, sector 32839936 EXT4_fs error: (device sda5): ext4_find_entry:935: inode #393217: comm init: reading directory lblock 0 INIT: No inittab file found Enter runlevel: 

So I guess, the HDD is accesible as a storage, but not bootable. The partitioning scheme on that HDD is as under if that’d help.. (GPT scheme)

 partition FileSystem size flags --------- ----------- ---- ----- /dev/sda1 unknown 2.00MB bios_grub /dev/sda2 ext2 128MB # was supposed to be common boot partition for chain loading /dev/sda3 swap 1.5GB /dev/sda4 ext4 8GB # Linux 1 (somehow, Grub does not show this in the menu, cannot boot into) /dev/sda5 ext4 8GB # Linux 2 (I could only boot into this one from Grub.) /dev/sda6 ext4 94GB # DATA unallocated _ 1MB 

I booted from USB and did a ‘fsck’ on all partitions. All (except /sda5) were reported clean. /dev/sda5 reported many errors (probably around a couple of hundred), I only kept entering ‘y’ for all the prompts. Inbetween there were messages like ‘linking ‘lost+found’ . ‘ After a runnning 2 passes on all partitions, when I re-booted from the HDD, here is the latest error.

 INIT: verision 2.88 booting INIT: No inittab file file found Enter runlevel: 

Does it look like I’d be able to get back the OS instance and boot?

Читайте также:  Пароль от пользователя root линукс

Hmmm. It did not! I tried on another laptop, that could not find MBR. I formatted it and made it bootable via another program («Universal USB Installer» this time) which warned me during the process that an error occured and drive may not be bootable. So looks like the drive has developed someproblem (though data is accesible) and I need to find another pen drive and come back here with errors if any.

Note that the failed command: READ DMA points toward the HDD having problems. It could be something else as well, but I would definitely not assume that the HDD is OK. My recommendation would be to refresh your backup (ideally to some media other than your most recent back) before something happens to the drive and it outright refuses to work.

Also, please see if you can focus this question. Right now it’s about two problems (the HDD failing READ DMA, and the thumbdrive failing to boot). It’s better if you split this into two separate questions that can be answered individually, as the problems are extremely unlikely to have the same cause.

It turns out that the USB pen was not faulty after all. I was using unetbootin from my office provided laptop. Probably the disk encryption program and/or windows permissions (I never really understood them!) prevented copying some files. Unetbootin did not tell me that. ‘Universal USB Installer» however showed some errors and also told me that the USB may not be bootable! So created the USB again (this time from a barebones windows VM on the same laptop and using UUI) and it worked. Updated the post, now with other symptoms of what happened next!

Читайте также:  Red hat linux ifconfig

1 Answer 1

The first error you reported:

ata1:00: status: < DRDY ERR >ata1.00: error ata1:00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 ata1:00: BMDMA stat 0x25 ata1:00: failed command: READ DMA 

says that a READ DMA ATA command to a disk on ATA port 1 failed (status includes ERR for error). That port is most likely the hard disk, and the error points toward the drive having problems. The DMA part can likely be ignored; DMA is Direct Memory Access which is the dominant transfer mode these days, and if you were having RAM or RAM bus problems to the degree that you were hitting something like that repeatedly, you’d likely be seeing a ton more errors if the system was able to function at all.

end_request: critical target error, dev sda, sector 32839936 EXT4_fs error: (device sda5): ext4_find_entry:935: inode #393217: comm init: reading directory lblock 0 INIT: No inittab file found 

says there is some problem on /dev/sda, sector 32839936, which with 512-byte sectors puts us physically toward the end of the /dev/sda5 partition, which adds up with device sda5 as reported by the file system driver. The error reported by init together with the file system driver’s error details points toward a problem with the file system causing /etc/inittab to be unavailable or (less likely) unreadable. This would mean that either the root directory, the /etc directory, or the /etc/inittab file entry are somehow involved in the corruption. Given the inode number, I’d take a shot at /etc/inittab specifically being the culprit, until proven wrong.

Suspecting a HDD crash, I took it out and used in another PC as an external USB HDD drive and I was able to mount & see all partitions and files within. So I assume Disc is OK.

I would say that your assumption is unfounded. The disk is obviously having some problem; with any luck, it’ll be easy to fix.

Читайте также:  Автоматизированная операционная система линукс

The first thing I would do in your situation is to refresh my backup of everything that is on that disk. Make sure that you do not overwrite or delete anything from your most recent backup, as there is certainly a possibility that you will need it. Perhaps the best option is to make a fresh backup onto a new (or at least not previously used for your own backups) drive of everything that you are able to access. Expect some I/O errors on the source while making that copy.

Second comes attempting recovery. With any luck, given the errors, this is a single-sector or few-sectors problem which has caused a small amount of file system corruption, in which case e2fsck should be able to repair most of the damage. Some of your files are likely gone, but with some luck, you might be able to find them in /lost+found under the file system’s mount root (meaning for example /data/lost+found if you mount /dev/sda5 on /data) after having e2fsck do what it can. Otherwise, do a comparison against your most recent backup from before the problems started, and restore relevant files from the backup. (Did I mention backups are useful if bad things ever happen, as they inevitably do?)

Third comes the question of whether you can trust the drive for future use. A few bad sectors doesn’t have to be catastrophic from the drive’s point of view, but rotational drives about 100 GB in size practically cannot be sourced new today in most form factors, which points to this being a relatively old drive. Personally, I’d probably just accept that the drive has outlived its useful life at this point and get a replacement, but then again I am rather paranoid when it comes to my data; your mileage may vary. You will have to weigh the cost of a replacement drive against the risk of total failure of the drive and subsequent total loss of all the data on the drive.

Источник

Оцените статью
Adblock
detector