Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using soft raid linux raid1 on my server. last saturday, on the disk has a failure because I could see error below from my log

Mar 16 08:38:40 storage-1 kernel: [694968.826388] ata2.01: status: { DRDY ERR }
Mar 16 08:38:40 storage-1 kernel: [694968.826412] ata2.01: error: { UNC }
Mar 16 08:38:40 storage-1 kernel: [694968.848390] ata2.00: configured for UDMA/133
Mar 16 08:38:40 storage-1 kernel: [694968.864359] ata2.01: configured for UDMA/133
Mar 16 08:38:40 storage-1 kernel: [694968.864366] sd 1:0:1:0: [sdc] Unhandled sense code
Mar 16 08:38:40 storage-1 kernel: [694968.864368] sd 1:0:1:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Mar 16 08:38:40 storage-1 kernel: [694968.864371] sd 1:0:1:0: [sdc] Sense Key : Medium Error [current] [descriptor]
Mar 16 08:38:40 storage-1 kernel: [694968.864374] Descriptor sense data with sense descriptors (in hex):
Mar 16 08:38:40 storage-1 kernel: [694968.864376]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 
Mar 16 08:38:40 storage-1 kernel: [694968.864382]         05 10 b7 3f 
Mar 16 08:38:40 storage-1 kernel: [694968.864384] sd 1:0:1:0: [sdc] Add. Sense: Unrecovered read error - auto reallocate failed
Mar 16 08:38:40 storage-1 kernel: [694968.864388] sd 1:0:1:0: [sdc] CDB: Read(10): 28 00 05 10 b7 3f 00 00 90 00
Mar 16 08:38:40 storage-1 kernel: [694968.864393] end_request: I/O error, dev sdc, sector 84981567
Mar 16 08:38:40 storage-1 kernel: [694968.864421] raid1: sdc1: rescheduling sector 84981504
Mar 16 08:38:40 storage-1 kernel: [694968.864451] ata2: EH complete
Mar 16 08:38:40 storage-1 kernel: [694973.825824] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
Mar 16 08:38:40 storage-1 kernel: [694973.825854] ata2.01: failed command: READ DMA
Mar 16 08:38:40 storage-1 kernel: [694973.825880] ata2.01: cmd c8/00:20:3f:ba:10/00:00:00:00:00/f5 tag 0 dma 16384 in
Mar 16 08:38:40 storage-1 kernel: [694973.825882]          res 51/40:20:3f:ba:10/00:00:00:00:00/f5 Emask 0x9 (media error)

But when I check with cat /proc/mdstat, mdadm doesn'not detect this disk failure and it still keep the disk mountded in partition md3 like this

rivo@storage-1:~$ cat /proc/mdstat 
Personalities : [raid1] 
md3 : active raid1 sdc1[0] sdd1[1]
      976759936 blocks [2/2] [UU]

This create a problem on I/O that slow down teh access to the server.

Does anyone knows why the mdadm didn't detect this disk failure so it would remove automatically failed disk from the raid?

Is there any way to better configure the mdadm so it can detect such outage in the future?

share|improve this question
1  
Check disk with smartctl and dont wait until your raid will fail, buy new disk and replace that with errors –  B14D3 Mar 20 '13 at 8:08
add comment

1 Answer

mdadm doesn't monitor problems on drives - it just knows if disk runs and can be synced or not. This isn't exact explanation, maybe others knows and will write more about it. For better supervision of drives use smartmontools and its daemon smartd. If you want to recieve mail when error is detected, there should be something like this in config file (/etc/smartd.conf):

/dev/sda -d ata -H -m your.email@example.com
/dev/sdb -d ata -H -m your.email@example.com

To check drive info use smartctl:

smartctl -a /dev/sda
share|improve this answer
    
i have already check the disk with smartctl -a and detected that /dev/sdc was really faulty. But the things I don't understand is that in some disk problem, I see that faulty disk was removed automatically from the raid but for this one it was not the case. That's why I am asking why? –  Ulrich Mar 20 '13 at 10:37
add comment

Your Answer

 
discard

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.