Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

CHKDSK - Disk Cleanup?


  • Please log in to reply

#1
Danc20

Danc20

    Member

  • Member
  • PipPip
  • 53 posts
Hello, I have a question about CHKDSK and if it does Disk Cleanup or not. In a table, the article I am using reads:

The following table lists the exit codes that Chkdsk reports after it has finished:

Exit code Description
0 No errors were found.
1 Errors were found and fixed.
2 Disk cleanup, such as garbage collection, was performed, or cleanup was not performed because /f was not specified.
3 Could not check the disk, errors could not be fixed, or errors were not fixed because /f was not specified.


It is line 2 that I am concerned about. I don't really want to do a disk cleanup. Is this just when I run it from My Computer/Windows Explorer? Could it be something that I have to specify in order to do it or will it automatically happen?

Thanks for the intelligent answers.

Edited by Danc20, 25 October 2010 - 09:11 PM.

  • 0

Advertisements


#2
happyrock

happyrock

    Tech Moderator

  • Retired Staff
  • 9,285 posts
Understanding how Chkdsk works

Chkdsk tests both FAT and NTFS systems but NTFS is now the most common file system. Here is a brief description of what Chkdsk does when it runs on an NTFS system. Chkdsk's activity is divided into three major passes plus an optional fourth and fifth pass. During each pass a message and a progress report is displayed.
Phase 1: Checking files
During its first pass, Chkdsk examines each file record segment in the volume's master file table (MFT) and examines it for internal consistency. At the end of this phase, Chkdsk has identified the space that is in use and the space that is available, both within the MFT and on the volume as a whole.
Phase 2: Checking indexes (directories)

During this pass, Chkdsk examines each directory that is on the volume, checking for internal consistency and verifying that every file and directory that is represented by a file record segment in the MFT is referenced by at least one directory. Chkdsk confirms that every file or subdirectory that is referenced in a directory actually exists as a valid file record segment in the MFT and also checks for circular directory references. Finally, Chkdsk confirms that the time stamps and file size information for the files are up-to-date in the directory listings for those files.
Phase 3: Checking security descriptors

During this phase, Chkdsk examines each security descriptor that is associated with files or directories on the volume. Security descriptors contain information about ownership of a file or directory, about NTFS permissions for the file or directory, and about auditing for the file or directory.
Phases 4 and 5: Checking sectors (optional)

If the /R switch is in effect, Chkdsk runs two more passes to look for bad sectors. During stage 4, Chkdsk verifies all clusters in use; during stage 5, Chkdsk verifies unused clusters. Note that this process can be quite lengthy. taking many hours.

Caution
Interrupting the Chkdsk process when it is used with the /F or the /R switch is not recommended. The integrity of the disk can be compromised by stopping the process. Do not start a scan if a thunderstorm is expected and you are subject to power failures. I also strongly advise an uninterruptible power supply to guard against short-term power outages or fluctuations.
  • 0

#3
Macboatmaster

Macboatmaster

    7k

  • Member
  • PipPipPipPipPipPipPipPip
  • 7,237 posts
I will stand corrected by happyrock, as he is far more expierenced than me.
However my understanding of the situation is:

2 Disk cleanup, such as garbage collection, was performed, or cleanup was not performed because /f was not specified.


That disk cleanup mentioned in the chkdsk report is NOT the same as the disk cleanup in start, programs, accessories, system tools.
The one in chkdsk is basically Unused file fragments.
  • 0

#4
Danc20

Danc20

    Member

  • Topic Starter
  • Member
  • PipPip
  • 53 posts
Thank you both very much. I had been looking for something in-depth on CHKDSK just for curiosity sake, kudos to microsoft!

That makes sense, it would be very unjust for Microsoft to do a Disk Cleanup like that, thanks a lot for both the responses :D.

Edited by Danc20, 27 October 2010 - 07:11 PM.

  • 0

#5
Macboatmaster

Macboatmaster

    7k

  • Member
  • PipPipPipPipPipPipPipPip
  • 7,237 posts
If you really want detailed info on chkdsk se this
http://technet.micro...y/bb457122.aspx
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP