[comp.sys.ibm.pc] What should I do when HD has lost clusters ?

wjin@cs.purdue.EDU (Woochang Jin) (06/02/90)

I have a 42 M Fujizu MFM hard drive and when I 'chkdsk', it complains :
11 lost clusters. convert to files ?
My friend advised to reformat the disk drive. So I backed up the whole
disk and reformatted it using 'Disk Manager' which was provided with the
hard disk. I chkdsk'ed and it was ok. But after a week, the lost clusters
happened again. But the whole thing seems to work O.K.
Do I leave it or have to do something for this ?
Could anybody tell me why this happens and what I should do this case ?
I saw an advertisement of SpinRite II and it seems to fix almost everything
in hard disks. Will it be of any help ?

Thanks, in advance.

------
W. Jin

cs163wau@sdcc10.ucsd.edu (Gary H) (06/02/90)

Use chkdisk /f
That should work.  

Gary

kdq@demott.COM (Kevin D. Quitt) (06/03/90)

In article <10755@medusa.cs.purdue.edu> wjin@cs.purdue.EDU (Woochang Jin) writes:
>I have a 42 M Fujizu MFM hard drive and when I 'chkdsk', it complains :
>11 lost clusters. convert to files ?

    A lost cluster is one that is marked as being in a file, but none of
the files on your system claim it.  This usually happens when a program
is sloppy about its scratch files, and doesn't handle things properly when
you control-c out. (or if you power off in the middle, etc.).

    First of all, you need to CHKDSK /F, the /F telling CHKDSK it's OK to
fix the problems it finds.  Second, when it asks you whether to convert the
lost clusters to files, answer no.  This will properly make those sectors
available to your system.

    The only time you answer yes, is if you've lost a file, and suspect that
the file is in those "lost clusters".

    Good Luck!


-- 

 _
Kevin D. Quitt         Manager, Software Development    34 12 N  118 27 W
DeMott Electronics Co. 14707 Keswick St.   Van Nuys, CA 91405-1266
VOICE (818) 988-4975   FAX (818) 997-1190  
MODEM (818) 997-4496 Telebit PEP last      demott!kdq   kdq@demott.com

      96.37% of the statistics used in arguments are made up.

wargopl@image.soe.clarkson.edu (Peter L. Wargo) (06/03/90)

From article <10755@medusa.cs.purdue.edu>, by wjin@cs.purdue.EDU (Woochang Jin):
> I have a 42 M Fujizu MFM hard drive and when I 'chkdsk', it complains :
> 11 lost clusters. convert to files ?
> My friend advised to reformat the disk drive. So I backed up the whole
> disk and reformatted it using 'Disk Manager' which was provided with the
> hard disk. I chkdsk'ed and it was ok. But after a week, the lost clusters
> happened again. But the whole thing seems to work O.K.

Well, the problem lies within an application program, not your hard disk.
Lost clusters occur when the FAT (File Allocation Table) on your hard disk
'looses track' of those clusters & cannot recover them.  (*Brief* analogy...)
Some programs may write data to the disk & delay updating the FAT for speed
reasons.  (Rare, but possible)  As a result, if the computer gets turned off
before the FAT *is* updated, the clusters become 'loose cannons'.


> Do I leave it or have to do something for this ?
> Could anybody tell me why this happens and what I should do this case ?
> I saw an advertisement of SpinRite II and it seems to fix almost everything
> in hard disks. Will it be of any help ?

As far as spinrite goes, it is excellent for testing & doing low-level format.
I use it for keeping my two HD's (115M) in peak operating condition.  But, I
dont think it would help in this case.  Buy it anyway, tho.  It's well worth
the price.

Pete

-- 
Peter L. Wargo - wargopl@sun.soe.clarkson.edu, amoung others...
"I don't believe it - I just spent 4 years at an expensive university-
 and I end up as a top-40 DJ..."

emmo@moncam.co.uk (Dave Emmerson) (06/03/90)

In article <10755@medusa.cs.purdue.edu>, wjin@cs.purdue.EDU (Woochang Jin) writes:
> I have a 42 M Fujizu MFM hard drive and when I 'chkdsk', it complains :
> 11 lost clusters. convert to files ?
> My friend advised to reformat the disk drive. 


Your friend doesn't appear to know the difference between "lost clusters"
and "bad blocks".
Run chkdsk /f again, this time reply 'y', then use LIST.COM or NU.EXE to 
inspect the files it produces. These will be in the disk's 'root' (\)
directory, named something like file0000.chk (read your DOS manual).
They'll probably contain garbage, they're usually the result of some
kind of abnormal programme termination while files which have been written
to are still open. Inspecting them might give you a clue as to what you
are doing wrong. Afterwards, you can erase them and forget them, there's
certainly no need to re-format.

Dave E.

darcy@druid.uucp (D'Arcy J.M. Cain) (06/04/90)

In article <10755@medusa.cs.purdue.edu> wjin@cs.purdue.EDU (Woochang Jin) writes:
>I have a 42 M Fujizu MFM hard drive and when I 'chkdsk', it complains :
>11 lost clusters. convert to files ?
>My friend advised to reformat the disk drive.
Re-format your list of friends.  :-)

>So I backed up the whole
>disk and reformatted it using 'Disk Manager' which was provided with the
>hard disk. I chkdsk'ed and it was ok. But after a week, the lost clusters
>happened again. But the whole thing seems to work O.K.
>Do I leave it or have to do something for this ?
>Could anybody tell me why this happens and what I should do this case ?
>I saw an advertisement of SpinRite II and it seems to fix almost everything
>in hard disks. Will it be of any help ?
>
Although not that frequent, this question is pretty standard and should
probably be added to the FAQ.

OK, first a short course in how DOS handles files.  I will ignore the
question of subdirectories for the moment.  Each DOS disk whether hard
or floppy has a directory area and a FAT (*) or "File Allocation Table."
The FAT is a table with one entry for each possible cluster on the disk.

As an example, consider a mythical disk which is 4K and uses a cluster
size of 1K.  Assume that the FAT and directory are in addition to the 4K.

When the disk is first formatted, the FAT is set up with with 4 entries,
with 0 in each entry.  This indicates that no clusters on the disk are in
use.  Let's say you now create a 2K file.  DOS finds the first 2 available
clusters on the disk (1 & 2 in this case) and reserves them for the file.
It places a 2 in entry 1 to show that the files which starts in cluster
1 continues in cluster 2.  It places a -1 in entry 2 to indicate that the
file ends in that cluster and does not continue.  Now the entire file is
pointed to by following the pointers starting at entry 1 in the FAT.

DOS next has to point to the first cluster of the file and somehow keep
track of the file name and other information.  It uses the directory
for this.  It finds the first directory entry that is not being used and
puts into it the file name, date and other information including the
number of the first cluster where this file is stored.

Now back to the question.  Consider what would happen in the above
example if the computer lost power after creating the FAT entries but
before it had a chance to create the directory entry.  You now have a
bunch of clusters which are reserved for a file but there is no pointer
to it so you can't access the file.  This is what chkdsk determines.  It
sees that there is a cluster chain but it can't find any directory entry
so it reports that there are some lost clusters.

What do you do about this?  Run chkdsk with the '/f' option.  When it
asks you if you want to save the clusters say yes.  Chkdsk will then
give all the lost chains a name in the form "FILExxxx.CHK" where "xxxx"
is replaced by a number.  These files are created in the root directory.
You can then examine these files to see if there is anything important
but the usual next step is to simply erase them.  This will free up all
the space lost to unreferenced clusters.

Well, I didn't mean to write a novel here but I hope this clears up the
subject for many people.  BTW: I have made a number of simplifications
above so it isn't exactly as described but the essentials should be
correct.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Government:
D'Arcy Cain Consulting             |   Organized crime with an attitude
West Hill, Ontario, Canada         |
(416) 281-6094                     |

silver@xrtll.uucp (Hi Ho Silver) (06/05/90)

From article <10755@medusa.cs.purdue.edu>, by wjin@cs.purdue.EDU (Woochang Jin):
$ I have a 42 M Fujizu MFM hard drive and when I 'chkdsk', it complains :
$ 11 lost clusters. convert to files ?
$ My friend advised to reformat the disk drive. So I backed up the whole
$ disk and reformatted it using 'Disk Manager' which was provided with the
$ hard disk. I chkdsk'ed and it was ok. But after a week, the lost clusters
$ happened again. But the whole thing seems to work O.K.

   That's like using a bazooka to wipe out a couple of ants.  What that
lost clusters message means is that chkdsk has looked at the file allocation
table and discovered that there are some parts of the disk which are not
allocated to files, but which are also not listed as being available - i.e.
they're lost.  The procedure to recover from this problem is simple.  Run
chkdsk with the /f ("fix") option and do one of the following two things
when it asks you if you want to convert them to files:

1.  Say yes if you think the contents of those lost clusters might be
    stuff you need to keep around.  chkdsk will then take them and turn
    them into a series of files in your root directory named file0000.chk,
    file0001.chk et seq.  Have a look at these files, renaming the ones
    you want to keep and deleting those you don't want.

2.  Say no if you're sure the contents of those lost clusters are stuff
    you don't need.  chkdsk will then return them to the list of free
    clusters on the disk.
-- 
   /Nikebo \ Nikebo says "Nikebo knows how to post.  Just do it."\silver@xrtll/
  /---------\_____________________________________________________\----------/
 /yunexus!xrtll!silver (L, not 1)\ Hi Ho Silver \   just silver for short   /
/Silver:  Ever Searching for SNTF \  Life sucks. \  someone buy me a BEER! /

cak@vpnet.chi.il.us (Cindi Knox) (06/06/90)

A little known option is to run CHKDSK/F and answer N

This is good if A1) you know what you did wrong or A2) you don't care and
B) you don't have the time and/or inclination to look at/delete a number
of FILExxxx.CHK files equivalent to the number of chains listed in
xxxx lost clusters in xxxx chains. CHKDSK will then free up the lost clusters 
directly, and not make those FILExxxx.CHK which would be in your root directory
regardless of the directory they were SUPPOSED to be in.

Cindi Knox	| You've got a lot of living to do without life.
		| 
cak@vpnet	| ``Little Miss S.'' by  Edie Brickell and New Bohemians.