On Wed, 24 Sep 2003, Jim Kleckner wrote:
> Szakacsits Szabolcs wrote:
> > On Sun, 31 Aug 2003, Jim Kleckner wrote:
> ...
> >>Do you have any idea how much danger there might be in clearing the bad
> >>block list?
> >
> > In theory 0. Think about it: that's a case when, for example, bad sectors
> > start to appear. Windows should handle it gracefully, otherwise everybody
> > who has bad sectors would have a problem.
> >
> > If you get the source and comment out only this one line [of course my
> > solution is much more complex but it still needs the time I don't have :(],
> > it should work,
> >
> > look_for_bad_sector(ctx->attr);
> > to
> > // look_for_bad_sector(ctx->attr);
> >
> > If you enlarge and you're _really_ unlucky ntfsresize might quit with error
> > if it tries to use just one of the bad sectors. But Windows chkdsk at boot
> > time (its scheduling by ntfsresize must be successful) must fix this. I
> > wrote ntfsresize in a way that any time it quits (or box crashes, power
> > outage, etc), the scheduled, boot time chkdsk must be always able to fix
> > the relevant NTFS.
>
> I got around to doing this last week and it worked great, thanks!
>
> To ensure that there were still no bad blocks, I ran dd to read
> the entire disk and write it to /dev/null
> dd if=/dev/hda of=/dev/null
> No errors so I then ran a recompiled version of ntfsresize with the
> look_for_bad_sector call commented out as suggested. It worked
> fine and the subsequently scheduled chkdsk was clean.
> The filesystem was now 60GB instead of 20GB.
Oh, yes. This was a new disk without bad sectors to where you did a
'dd ... noerror' from a disk having bad sectors. So actually the
above change also fixed/reseted the incorrect "bad sectors" entry
NTFS had :)
> Many thanks for the help!
You're welcome and thanks for letting us the outcome :)
Szaka
|