[nflug] phlak

Sam Stern samstern at samstern.net
Tue May 23 22:44:51 EDT 2006


 

> -----Original Message-----
> From: nflug-bounces at nflug.org 
> [mailto:nflug-bounces at nflug.org] On Behalf Of eric at bootz.us
> Sent: Tuesday, May 23, 2006 9:59 PM
> To: nflug at nflug.org
> Subject: [nflug] phlak
> 
> My hard drive might have died and I'm now running phlak, I'm trying to
> find the right tool to absoluty be sure that my hard drive is 
> the problem
> and not a  corrupt system file. Does anyone know what I can 
> run on phlak
> to check my hard drives integrity??
> 
> Thanks all,
> Eric


Hi Eric,

I'm not familiar with Phlak -- although it seems to be the wrong tool for
this kind of work. Here is the process I use when deciding on what has
happened to a drive:

Before all else, I make certain the cables are good! Bad or loose cables can
cause allot of problems. If the cables are good (new) then continue.

I use the latest Knoppix for the best support of IDE chipsets etc.

Smartctl --smart=on <- activate SMART
Smartctl -t long <- even if this passes or fails continue

Next I like to set a set a sane and fast ide environment:
Hdparm -I <-- get the settings that exist now so you reset to them later.
Hdparm -tT  <-- baseline speed
Hdparm -c1 -m254 -u1 -d1 -a0 -A0 -D1 -Z -W0 <- sets 32 bit IO, dma, unmask
irq, and drive defect mapping and it  disables acoustic managing, disables
read ahead, Seagate sleep mode and write ahead.
Hdparm -tT <--- speed should be the same or better. You can use this speed
to guess how long bad blocks will take to run.
Badblocks -n -o ~/drive_defect_map.txt  <-- starts badblocks on the drive
using the non destructive test. This will allow the drive to re map bad data
clusters while saving all of the readable data. You should add the -b <block
size> parm to match your FS. This will take the better part of a day but
will correct all but the worst errors by remapping the bad sectors.
Less ~/drive_defect_map.txt <-- if this is empty then all the sectors were
good OR all the bad one got remapped. If there are bad sectors here, then
the drive is almost dead. You might loose data. But not all of it.
Smartctl -t long  <-- most smart errors will be gone. If not, then skip the
fsck and make a drive image and recover off that! Never fsck a drive if it's
smart test failed.
Now you can fsck the drive. Alliteratively you can use ddrescue with tar
-czf to make a backup. 
Use hdparm to reset the drive -- at least issue a 
Hdparm -a (number of read ahead you started with) -A1 -W1 


HTH

Sam S>


Sam S.

_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list