PDA

View Full Version : How often do you CHKDSK?


dbarrow
08-30-2006, 11:30 AM
Plauged by strange errors?
Does your network seem to hang looking for something?
Do you have backups that won't restore?
Explorer lagging?

Many of these problems can often be traced back to disk corruption and eliminated by running CHKDSK.

With billions of bits of data stored on your hard drives, and complicated by little things like "data leakage", incomplete writes from bad shutdowns, severe fragmentation, expanding and contracting files ....

It is not uncommon to end up, over a period of time, to end up with some (many?) corrupted files.

Physical hardware breaks down...
Hard drives have a built-in tolerance level and extra capacity (above and beyond what is listed as the capacity of the drive) to account for bad blocks and sectors where the media is, or goes bad and will no longer retain data.
The bad blocks are marked off as no longer usable when running CHKDSK and recoverable data is moved to another working block.

XP has a built-in "automatic" defrag that supposedly keeps fragmentation down to a minumum. While it is a vast improvement over Win9X, it does pay (particularly on partitions that see a lot of writing) to run manual defrags regularly.
You can create DEFRAG.BAT files and schedule them with Task Scheduler to run at regular intervals:
Notepad: (command line) defrag C: -f (-f is the Force switch)
Save file as Defrag C.bat
Schedule task as Defrag C , run weekly

CHKDSK is a utility that does NOT run automatically.
A major problem with the file table will trigger a "dirty" marker on the drive or partition and automatically trigger a CHKDSK task run on the next boot.
Minor disk and file corruption will NOT.

So... your ever so critical file just happens to be spread across a number of bad blocks and may be shot full of holes like swiss cheese.
Or... your file may be there completely intact but is 'lost' in the file table and can't be called.

Most of us never or regularly bother running CHKDSK.
In fact, most users probably don't know it even exists as a utility.

CHKDSK fixes file errors. It marks bad blocks unusable and moves any salvagable data from them to a good block. It also measures and marks remaining free space.
The file table is the roadmap to ever changing locations of data on your drive and must be maintained with current and up to date information.

CHKDSK takes TIME...
One of the reason people are loathe to run CHKDSK is that it is a process that can seemingly take forever, particularly on large partitions, whole drives, or partitions with very large files. The process of moving a huge file, like a backup image, can take hours.
Running CHKDSK when you intend to be using the machine for something else in the immediate future is not something you want to do, especially if it encounters a load of file errors and must spend considerable time repairing them.
Running CHKDSK is something best left as an overnight chore or something your fire off before leaving for the day so it has time to run.

http://support.microsoft.com/kb/315265/en-us
How to perform disk error checking in Windows XP
*complete tutorial

Should you run CHKDSK?
How often?

Yes, particularly if you find strange errors, hangs, slow performance. They may be caused by file corruption.

Frequency?
Monthly isn't a bad idea but, at the least, every few months.
Run CHKDSK and see the results, where it is fixing a load of errors, and you may be encouraged to run it more frequently.

Follow CHKDSK with DEFRAG
CHKDSK will be moving things around so following it with a DEFRAG will ensure large files are contiguous.
It may be necessary to run a DEFRAG prior to running CHKDSK if there are a lot of large files on the partition or disk to make it easier (faster) to run the CHKDSK.

If you doubt the necessity of running CHKDSK and DEFRAG, just do it on a machine where this has not been done in some time. You may be shocked by the results!
Plan on it being an all day affair!

Performance will improve and many of those nagging errors will vanish!

For ACRONIS users:
Acronis seems to be very picky about drive errors:
"Can't read from sector XXX on partition XXX"
This can cause scheduled Acronis image creation to hang the machine or program as it "gets stuck" on the bad sector.
Regularly running CHKDSK and DEFRAG will keep your Acronis backups running smoothly.
This also prevents corruption of your image file by marking off the bad blocks on the drive to make sure your image isn't written to one and corrupted.

*See also: MSKB articles on using CHKDSK from a COMMAND LINE to mark a partition "dirty" and schedule a disk check on next boot.

The difficulty in running CHKDSK when YOU want by launching it from a TOOLS menu while in Windows is
partitions that have files marked "in use" by the system will set the "dirty" flag for CHKDSK on next boot.
Partitions that have no "in use" files will run CHKDKS from the menu. You don't know until you try which will be which so be prepared to commit to a long wait rather than putting it off for a reboot.

In any case, include CHKDSK now and then in your list of chores and get it done. Your machine will be much happier!

dbarrow
08-30-2006, 11:48 AM
Note that I post this after spending an entire day running CHKDSK and DEFRAG on 3 machines.

Unknown what major malady stuck two of them overnight but I got aggrevated enough to do an Acronis restore of the E:\OS on both rather than fighting with them.
Cured that problem fast enough but then I decided to do long overdue maintenance with full AV deep scans, AdAware scans, etc.

On the network storage machine, which sits in a corner with the monitor off and only gets touched when it acts up, has not been touched for months.
Oh boy! CHKDSK was a long and tortuous process on that one finding loads of errors on many or the partitions, particularly the ones storing all the large backup images from the other machines.

That was motivation enough to do the CHKDSK and DEFRAG along with DISK CLEANUP on each partition on each or the other machines.
The chore turned into an all day event dragging on into the night and putting me up against the wall with the arrival of the thunderstorms.
Fortunately, the CHKDSK run that was taking the longest and finding the most errors completed just as the lightning arrived and I was able to shutdown.

With all errors cleared, a fresh defrag and cleanup, all the machines seem to have considerably improved in speed and performance.
Note considerable network performance improvement!
When you have a bad file or bad file table error in a NETWORK SHARE, the other machines looking at that share will slog network performance considerably trying to resolve it.
(Why does machine #2 seem to be searching for something on the network?)
If you have your FOLDER OPTIONS\VIEW set for
"automatically search for network folders and printers"
(should uncheck this)
one of these file table errors can cause this to lag beyond belief.
(also turn off Indexing Service)

Dan18960
08-31-2006, 06:51 AM
AW the joys of running a true NOS. Novell and Windows Server both do their cleanups at daily intervals (usually 1 am unless you change the scheduling).

:cool: