On Tue, 30 Nov 2010 11:52:14 +1100, Neil Brown <neilb@xxxxxxx> wrote: > On Mon, 29 Nov 2010 15:23:56 +0000 Philip Hands <phil@xxxxxxxxx> wrote: > ... > I assume you mean "RAID1" where you wrote "RAID0" ?? correct ... > > root# dd bs=512 skip=19087681 seek=19087681 count=1 if=/dev/sdc of=/dev/sdb > > dd: writing `/dev/sdb': Input/output error > > 1+0 records in > > 0+0 records out > > 0 bytes (0 B) copied, 11.3113 s, 0.0 kB/s > > You should probably had added oflag=direct. > > When you write 512 byte blocks to a block device, it will read a 4096 byte > block, update the 512 bytes, and write the 4096 bytes back. Ah, right -- I was wondering if something like that was going on. That makes the behaviour much more understandable, thanks. Looking further back into the logs, I've found quite a few instances of "read error corrected (8 sectors at 167360736 on sdb4)" type messages, so mostly md seems to be doing the right thing. I'm still a little suspicious about the fact that I can make md read the contents of the whole disk, while adding a third disk to the raid, and unreadable blocks were being found, but not rewritten (the pending sectors count ended up being 32) Perhaps the disk's controller is just defective, but if that's not the case it would seem that duff sectors were being found during the md rebuild, but not all rewritten. I've now added the disk back into the RAID1, and it's rebuilding, thus overwriting the disk -- the pending sector count is dropping, so those writes are at least pretending to work at present ... which is what made me suspicious about the difference between just writing to the disk, and letting md do it as a consequence of the read failing. Is it likely that the disk is getting in such a strop that it first refuses the read, and then ignores a write in a way that doesn't provoke md into declaring the disk dead? Still seems a bit odd to me, even if the disk is a bit broken. Anyway, thanks for the insights. Cheers, Phil. -- |)| Philip Hands [+44 (0)20 8530 9560] http://www.hands.com/ |-| HANDS.COM Ltd. http://www.uk.debian.org/ |(| 10 Onslow Gardens, South Woodford, London E18 1NE ENGLAND
Attachment:
pgpmnw8Dw62xi.pgp
Description: PGP signature