Hi list, A quick question - is it recommended to initialise disks before using them to allow the disks to map out any "bad spots" early on? I've seen some "uninitialised" disks (ie. new disks, thrown into a machine, newfs'd) start to show read errors within a few months of deployment, which I thought one or two might seem okay, but on a number of machines is more than a coincidence... Is it recommended/required to do something like: dd if=/dev/zero of=/dev/ad0 bs=1m before use to ensure the drive's sector remappings are all in place, before then doing a newfs? FWIW, I've been seeing this on more 6.0 systems that I would have thought to be just chance... Cheers Antony
On Thu, Aug 17, 2006 at 03:35:14AM -1000, Antony Mawer wrote:> Hi list, > > A quick question - is it recommended to initialise disks before using > them to allow the disks to map out any "bad spots" early on? I've seen > some "uninitialised" disks (ie. new disks, thrown into a machine, > newfs'd) start to show read errors within a few months of deployment, > which I thought one or two might seem okay, but on a number of machines > is more than a coincidence... > > Is it recommended/required to do something like: > > dd if=/dev/zero of=/dev/ad0 bs=1m > > before use to ensure the drive's sector remappings are all in place, > before then doing a newfs? > > FWIW, I've been seeing this on more 6.0 systems that I would have > thought to be just chance...This probably isn't a bad idea in general. It might even be something we should add to sysinstall. -- Brooks -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060817/fdcc5be6/attachment.pgp
On Thursday 17 August 2006 8:35 am, Antony Mawer wrote:> A quick question - is it recommended to initialise disks before using > them to allow the disks to map out any "bad spots" early on?Note: if you once you actually start seeing bad sectors, the drive is almost dead. A drive can remap a pretty large number internally, but once that pool is exhausted (and the number of errors is still growing exponentially), there's not a lot of life left. -- Kirk Strauser The Day Companies
On 17. aug. 2006, at 15.35, Antony Mawer wrote:> Hi list, > > A quick question - is it recommended to initialise disks before > using them to allow the disks to map out any "bad spots" early on? > I've seen some "uninitialised" disks (ie. new disks, thrown into a > machine, newfs'd) start to show read errors within a few months of > deployment, which I thought one or two might seem okay, but on a > number of machines is more than a coincidence... > > Is it recommended/required to do something like: > > dd if=/dev/zero of=/dev/ad0 bs=1m > > before use to ensure the drive's sector remappings are all in > place, before then doing a newfs? > > FWIW, I've been seeing this on more 6.0 systems that I would have > thought to be just chance...I think the change is that more systems use cheaper SATA drives now. On several occations I have been unable to build a RAID (hardware or software based) on brand new disks due to one of the drives "failing" during initialization. After zeroing all the drives with dd, everything works fine. I'm not sure if vendors cut corners on initially formatting their drives to save some $$ or if SATA just lacks some features over SCSI that causes trouble like this. -- Frode Nordahl
Antony Mawer wrote:> > Is it recommended/required to do something like: > > dd if=/dev/zero of=/dev/ad0 bs=1m > > before use to ensure the drive's sector remappings are all in place, > before then doing a newfs?It seems logical to read the whole device first with "conv=noerror" to be sure the drive has encountered and noted any correctable or uncorrectable errors present. Only then write the entire drive, allowing it to remap any noted bad sectors. i.e.: # dd if=/dev/ad0 of=/dev/null bs=64k conv=noerror # dd if=/dev/zero of=/dev/ad0 bs=64k The problem is that when dd hits the first bad sector, the whole 64k block containing the sector will be skipped. There could be more bad sectors there... or none... If you hit errors I would re-read the affected area with "bs=512" to get down to sector granularity. I seem to recall a utility posted to a freebsd mailing list some time ago that worked like dd(1), but would "divide and conquer" a block that returned with a read error. Intent being to get the job done fast with large blocks but still copy every sector possible off a failing drive by reducing to sector-sized blocks if necessary.... Unfortunately I can't find it now. Joe Koberg joe at osoft dot us