On Mon, 2014-06-09 at 18:09 -0600, Chris Murphy wrote: > On Jun 8, 2014, at 2:10 AM, Wilson Jonathan <piercing_male@xxxxxxxxxxx> wrote: > > > On Sat, 2014-06-07 at 18:52 -0600, Chris Murphy wrote: > >> I wrote: > >>> How can there still be pending bad sectors, and yet no error and LBA reported? > >> > >> So I started another -t long test. And it comes up with an LBA not previously reported. > >> > >> # 1 Extended offline Completed: read failure 60% 1214 430234064 > >> > >> # dd if=/dev/zero of=/dev/sda seek=430234064 count=8 > >> dd: writing to ‘/dev/sda’: Input/output error > >> 1+0 records in > >> 0+0 records out > >> 0 bytes (0 B) copied, 3.63342 s, 0.0 kB/s > >> > >> On this sector the technique fails. > >> > >> # dd if=/dev/zero of=/dev/sda seek=430234064 count=8 oflag=direct > >> 8+0 records in > >> 8+0 records out > >> 4096 bytes (4.1 kB) copied, 3.73824 s, 1.1 kB/s > > > > I may be missing something here, but surely after all this faffing about > > and errors isn't it about time to replicate the data to a new drive and > > then hit this one repeatedly with a very large hammer. > > > > The law of diminishing returns must surely be coming into play by now. > > No the question here isn't what's the right course of action from this point. This is an academic question: whether the reported behavior(s) are as designed. > > From an enterprise perspective, my understanding is even one bad sector is disqualifying and the drive goes back to the manufacturer if it's under warranty; or otherwise demoted for less important use if it's not. > > For consumer drives, which this is, all the manufacturers will say the drive is functioning as designed with bad sectors *if* they're being reallocated. Maybe some of them won't quibble and will send a replacement drive anyway. > > But what I'm reporting is an instance where an ATA Secure Erase definitely did not fix up a single one of the bad sectors. Maybe that's consistent with the spec, I don't know, but it's not what I'd expect seeing as every sector, those with an without LBA's assigned, are overwritten. Yet pending sectors were not remapped. Further, with all sectors overwritten by software (not merely the ATA Secure Erase command) yields no errors yet SMART reports there are still pending sectors, yet it's own extended test says there are none. I think that's bad behavior. But perhaps I don't understand the design and it's actually working as designed. > Thanks for the clarification over this being an academic question rather than a live, real world disk is playing up, what should I do type question. Your mention of the secure erase not, or seemingly not, re-mapping does raise an important question. If it does indeed remap, due to data change, but does not change the count then its an oddity, however if secure erase fails to remap and does not change the data at all then there is the potential for live data to be recoverable (although it would be a small amount) in some form, perhaps by directly driving the disk (as apposed to os control) or even moving the platters to another disk case or some other method dependent on the time and effort involved being worth it. > > Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html