[comp.sys.amiga.tech] Help: Error Validating Hard Disk!

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (12/31/89)

In <22906@ut-emx.UUCP>, mwood@ut-emx.UUCP (Matt A. Wood) writes:
>I had a system crash while writing to my hard disk, and now my hard 
>disk does not validate (key 14537 already set, it tells me).  I've
>run the HDToolBox verify program that came with the drive (A590), and
>it finds no bad blocks.  Diskdoctor finds a handful of bad blocks, but
>the numbers are ~19000, not 14537).  I have DiskSalv V1.42, but am
>not clear on how it might be used to patch a section of disk (if
>it can).  

A 'key n already set' error is not an indication of a bad block.  It is an
Amigados error that says you have two hash table entries pointing at the same
block, which is illegal to Amigados, and "don't care" to the drive controller.

About the only way, currently, that I know of to save the disk without backing
up and restoring, is to use something like Sectorama (or DiskX, or DiskEd, or
???), which is a sector editor that allows you to look at the information in
any sector on the disk. Unfortunately this does require a knowledge of the file
system, and even if you know the file system well, it is tedious, to say the
least.

What you have to do is find the hash table entries in error. These entries are
contained in the root block, user directory blocks, file header blocks,
extension blocks, and in the 'hash chains'. You can narrow down the search in
many cases by knowing what you were doing when the problem happened.

You were writing a file, so the problem is most likely associated with that
file. If you copy the file elsewhere (floppy, ram:, etc.) and then use
Sectorama to remove it from the directory structure, you might solve the
problem. You might also have another problem though, since that block is also
part of another path/file, and the result might be a 'funny' directory or a
bogus file with parts of two files in it. At least the disk should validate
once you have removed the file that was being written.

Perform a 'diskchange operation after removing the file, to cause the validator
to kick in again.

>The question then is: 
>   Do I really have to backup and reformat my hard disk just because the
>d*mn system crashed while writing a file?!?   Please tell me I don't 
>have to do this, please!

Only if the above desn't work. We don't have the tools for easily doing
anything about munged file systems yet.

-larry

--
" All I ask of my body is that it carry around my head."
         - Thomas Alva Edison -
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+

greg@noel.CTS.COM (J. Gregory Noel) (12/31/89)

Matt A. Wood (mwood@ut-emx.UUCP) writes:
>I had a system crash while writing to my hard disk, and now my hard 
>disk does not validate (key 14537 already set, it tells me).  ...

This may be a silly question, but I've just had the same thing happen to me
(see my separate posting, asking about recovering from indicated read/write
errors), but do you run SimCity from your hard disk?  That's the only new
program I've been running, and now I have an absolute \rash/ of hard disk
errors.....  I hope that SimCity is not the problem -- I love the game, but
if it's been infected with a virus, it needs to be eradicated.

>The question then is: 
>   Do I really have to backup and reformat my hard disk just because the
>d*mn system crashed while writing a file?!?   Please tell me I don't 
>have to do this, please!

I second this plea.  I'd like to know if there's some way to recover those
files before I panic.....

Tks,
-- 
J. Gregory Noel, UNIX Guru         greg@noel.cts.com  or  greg@noel.uucp

mwood@ut-emx.UUCP (Matt A. Wood) (12/31/89)

I had a system crash while writing to my hard disk, and now my hard 
disk does not validate (key 14537 already set, it tells me).  I've
run the HDToolBox verify program that came with the drive (A590), and
it finds no bad blocks.  Diskdoctor finds a handful of bad blocks, but
the numbers are ~19000, not 14537).  I have DiskSalv V1.42, but am
not clear on how it might be used to patch a section of disk (if
it can).  

The question then is: 
   Do I really have to backup and reformat my hard disk just because the
d*mn system crashed while writing a file?!?   Please tell me I don't 
have to do this, please!

If I do have to back it up, format, and restore (shudder), what's the
best PD backup utility out there?  


I'm a bit desparate about this, so I'd very much appreciate a quick
reply.  I can read off of the disk without problem, but cannot write
or delete (info shows 'validating workbench').

Thanks *very* much,

-- 
Matt A. Wood				matt@astro.as.utexas.edu
Astronomy Department			(512) 471-4419
The Univeristy of Texas 
Austin, TX  78712-1083			

caw@jolnet.ORPK.IL.US (Chris Wichura) (01/01/90)

Disk Repair v2.5c (part of Disk Mechanic from Lake Forest Logic) has the
REBUILD option enabled (finally!).  One of the things this option will
do is fix any duplicate keys, which is the problem here.

-- 
Christopher A. Wichura
u12401 @ uicvm.uic.edu  (my home account)
caw @ jolnet.UUCP       (my Usenet feed)

hugh@kink.UUCP (Hugh D. Gamble @ Phaedra V's Amiga 2500) (01/03/90)

[ Lie neater?  Why not just tell the truth? ]

In <963@lpami.wimsey.bc.ca>, lphillips@lpami.wimsey.bc.ca (Larry

>A 'key n already set' error is not an indication of a bad block.  It is an
>Amigados error that says you have two hash table entries pointing at the same
>block, which is illegal to Amigados, and "don't care" to the drive controller.
>
>About the only way, currently, that I know of to save the disk without backing
>up and restoring, is to use something like Sectorama (or DiskX, or DiskEd, or
>???), which is a sector editor that allows you to look at the information in
>any sector on the disk. Unfortunately this does require a knowledge of the file
>system, and even if you know the file system well, it is tedious, to say the
>least.

I've had success more than once using FixDisk.  I just click a button,
and the computer does the tedious part all by itself.  When I check
during the commercials in Elvira's Movie Macabre, and a requester is up
asking me if I want the duplicate key removed, I say yes and the deed is
done. 

I run kink under AmigaOS as a pretty busy news and mail site, as well as
doing different kinds of work and play on the beast, but it's hard to
recommend as a first choice for some of the former.  Being on all the
time with a lot of processes with filesystem activity going on, the odds
are fairly high that file reading or writing will be going on when I,
evil s/w, or even someone fiddling in a fuse box, cause a crash.

A comment for the fs guys at C=, it's important to me to be able to
recover a fs after a crash.  It's a common necessity, and hard right now
even with the best 3rd party & PD s/w that's available helping out. 
AmigaOS needs a good "fsck", even if it means making changes to the
default (now ffs, for HDs) filesystem, even if it means taking a
performance hit.  Gigabytes of >1Mbyte/s disk are great, but most of the
people who are willing to pay for it, aren't willing to watch Elvira for
2 hours because the system crashed while a file was open.

Now if PageFlipper, PhotoLab, Space Spuds, etc. worked under Amix ...
Nah, let's not give up on the Amiga's native OS yet, but for serious
work it still needs some serious work.  A C= supported product based on
Dave's DiskSalv with 1.4 wouldn't be a bad start (hint, someone at C=
*pay* Dave for it, OK?). 

>Perform a 'diskchange operation after removing the file, to cause the validator
>to kick in again.

I hadn't thought of that. Rather than "diskchange" a HD partition
I always do a reboot when I want to validate it.  Next time, I may try
the diskchange trick (then reboot anyways :-).




--
# Hugh D. Gamble (416) 267-6159  No Disclaimers.
# hugh@kink.UUCP 
# looking for a woman who can sit in a mini-skirt and talk philosophy,
# executing both with confidence and style. 

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (01/04/90)

In <50372.AA50372@kink>, hugh@kink.UUCP (Hugh D. Gamble @ Phaedra V's Amiga 2500) writes:
>>In <963@lpami.wimsey.bc.ca>, lphillips@lpami.wimsey.bc.ca (Larry
>>
>>Perform a 'diskchange operation after removing the file, to cause the validator
>>to kick in again.
>
>I hadn't thought of that. Rather than "diskchange" a HD partition
>I always do a reboot when I want to validate it.  Next time, I may try
>the diskchange trick (then reboot anyways :-).

The really neat part is when you have a disk that has some seriously munged
stuff that the validator doesn't pick up, and you are messing around with
Sectorama. If you make a change, like perhaps removing a file or directory from
the directory structure, you can go to the root block, change the 'bitmap
valid' flag (the entire longword, actually), to all zeros, exit Sectorama, and
invoke DiskChange. The bitmap valid flag being zeros is the Validator's cue to
traverse and check the entire file system and to rebuild the bitmap.

-larry

--
"Cavett Emptor - Let the talk show host beware!" - Evan Marcus
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+