Constantly Scanning Drives on Startup

The hard drive(s) in your computer run much slower than the main memory does. To avoid having to wait for the hard drive every time a program you are running needs to save something, the computer actually saves the information in main memory and writes it to the hard drive during gaps between the other tasks it is performing. One of the reasons you need to shut down the computer properly and not just turn it off is so that any data that is supposed to be written to the hard drive actually gets written there and doesn't get lost when the computer turns off.

To keep track of whether all of thew necessary writes to the hard drive have been performed the system uses what is known as a 'dirty flag' to indicate whether all of the data has been successfully written to the drive. The flag is set when a write request is first made and is cleared when the last of the data is actually written to the drive.

If for any reason the computer turns off with this flag still set then when the computer next starts up it will run a scan of the drive looking for incomplete files. It will then produce a report of any repairs that it applied to the file structure on the drive.

Where you have the system scan the drive on startup once and then start normally the next time then the most likely cause was that the computer got turned off too soon the previous time and so didn't get to reset the flag. You would expect this to occur if the computer went off if all your power went off or if the fuse on the circuit the computer is connected to were to blow while the computer is on.

If the system continues to run scans each time that you start the computer then the situation is more serious. If the scans actually report that they found errors then you may have a bad spot on the hard drive. All hard drives have some bad spots but with modern drives a small amount of space on the drive is reserved so that any bad spots can have the data stored in an alternate location within that reserved space. For a scan to actually show a bad spot on the drive means that the reserved space has been exhausted and that the drive itself is getting close to failure. In this situation you should purchase a new hard drive and get all your data transferred across before the drive fails.

The most awkward problem to resolve when it comes to the system constantly running scans on every (or almost every) startup is when the scans don't produce any errors. It gets even more annoying when you run further scans after startup and then use the fsutil dirty query C: command (substituting the appropriate drive letter) only to find that the dirty flag is still set (and that therefore yet another scan will occur the next time you start the computer). All that the scans prove in that situation is that there do not appear to be any errors on the hard drive itself. when this occurred on my computer I had just about reached the point of deciding to purchase a new hard drive when I got a "Backup Failed" message from my NAS telling me that it had been unable to connect to my computer to run the backup of my email folder. Further testing showed that any attempt to access shared drives on my computer were failing even when they originated on my own computer. This meant that my computer now had two things that were not working right and fortunately it turned out that the two were related.

Any attempt to access a shared folder on my computer from Windows was producing a "Not enough server storage is available to process this command" error message and then denying access to the drive (the NAS was simply reporting "Backup Failed" which was a lot less useful for working out the cause of the problem). Now this particular Windows error message is produced when there are too many network processes trying to run on the computer at the same time. The amount of storage allocated to these services is configurable within certain limits and so where your computer needs more space for networking you can update the registry to allocate more space to that and less space to everything else. To do this you need to run regedit and then go into HKEY_LOCAL_MACHINE \SYSTEM \CURRENT_CONTROL_SET \SERVICES\ LanmanServer \Parameters and find the IRPStackSize option (or create it as a DWORD if ot doesn't exist). If you then increate the value slightly and reboot the computer then the network error should disappear. If it doesn't then try increasing the value again and you should hopefully get rid of the network error before you get to the maximum value that option allows (if you don't then you may need to delete some programs from your computer to reduce the resources needed). Don't forget to backup the registry before you start changing it.

Once I had done this minor registry change then access to my shared drives was restored and I was able to get the backup to run. I then ran all the scans of the drive again to make sure that the dirty flag was not set before continuing to use the computer. The computer has not asked to run scans of any of the drives since and so obviously had I replaced the hard drive it would not have fixed the error.

go to top

FaceBook Follow
Twitter Follow