ARCHIVES

August 2011
July 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
August 2008
July 2008
June 2008
May 2008
March 2008
February 2008
January 2008
November 2007



CONTACT
About this blog: Computers hate me. They really do. Every time I try to do something unusual like add new hardware, something is guaranteed to go wrong. I decided to start writing about my constant problems so that someone else might benefit from my experiences - or at least laugh at them!

  Beware of HDDerase reducing your hard drive capacity

17 March 2009, 1:30am      


While my database server was down I thought I'd have a play with HDDerase, which is a secure erase utility for hard drives. Modern IDE and SATA drives respond to a command which does a secure erase "in drive." The readme file mentions that the utility can remove the Host Protected Area (HPA) and/or Device Configuration Overlay (DCO). I was hoping this might clear the SMART values to remove the phantom offline uncorrectable sector (see the update near the bottom of this post for an explanation).

One issue I had was that the BIOS in the machine I was using locks the drive. This is a special command which tells the drive to ignore any further security related commands. I got it working by unplugging the data cable (NOT the power cable as the readme suggests - it was probably written with IDE drives in mind), rebooting, then plugging it in. I felt reasonably safe doing this as SATA is meant to be hot pluggable.

Everything seemed to go fine, until I rebooted into FreeBSD. I noticed that the mirroring software seemed to be ignoring the drive. When I tried to force add it manually, it complained the drive was too small. Checking the logs I saw that indeed the reported size of the drive was now approximately 1 megabyte smaller than it used to be, which made it useless for mirroring!

Luckily I found the HDD Capacity Restore utility which has successfully reclaimed the missing 1Mb. So be warned, for some reason running a secure erase and deleting the HPA and DCO areas on a WD 750GB SATA drive seems to reduce its capacity. In most cases this wouldn't matter, you may not even notice the tiny fraction of its capacity missing; the exception is when you need it to match other drives exactly, such as in a mirroring situation.



Crisis averted for now - SNAFU...


UPDATE: Running the WDTLER utility (to set the Time Limited Error Recovery value) has also mysteriously decreased the reported capacity by 1MB on one of five WD drives installed. The others were unaffected.




  Don't accidentally hold down your power button

16 March 2009, 10:15am      


I just found out the hard way that my trick for disabling the power button under FreeBSD doesn't work if you press and hold it down. I was trying to reach behind to plug in a KVM cable to another computer, and unfortunately rested my hand on the power button. The case design has it right on the side so it's quite easy to press accidentally.

FreeBSD is NOT happy! Two mirrors are rebuilding, there's file system damage, enough for it to refuse to start... requiring fsck to be run manually. It's a database machine so I guess I'll be running a few REPAIR TABLE commands as well...