Monday, July 25, 2005 1:14 PM bart

Chkdsk saved my life

Well, that's a little exaggerated, but nevertheless I love chkdsk. A couple of minutes ago I plugged in my external 160GB harddrive on the firewire port of my laptop to run some VPCs for demo preparation. However, only a couple of folders showed up in Windows Explorer, all the rest was gone. And a little nice cute balloon popped up in my system tray telling me about volume corruption. First thought: this is a big bad dream :s.

However, chkdsk /f did the trick. It was the first time I saw chkdsk with so much output:

C:\Documents and Settings\Administrator>chkdsk m: /f
The type of the file system is NTFS.
Volume label is Matrox.

CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Correcting error in index $I30 for file 5.
Correcting error in index $I30 for file 5.
Sorting index $I30 in file 5.
Index verification completed.
CHKDSK is recovering lost files.
Recovering orphaned file SYSTEM~1 (27) into directory file 5.
Recovering orphaned file System Volume Information (27) into directory file 5.
Recovering orphaned file VIRTUA~1 (39) into directory file 5.
Recovering orphaned file Virtual PC Images (39) into directory file 5.
Recovering orphaned file Vsbeta.zip (867) into directory file 5.
Recovering orphaned file SQLSER~1 (868) into directory file 5.
Recovering orphaned file VS2005~1 (1787) into directory file 5.
Recovering orphaned file VS2005 + SQL2005 Beta 2 (1787) into directory file 5.
Recovering orphaned file Test (6111) into directory file 5.
Recovering orphaned file test.vhd (6201) into directory file 5.
Recovering orphaned file VISUAL~1 (12926) into directory file 5.
Recovering orphaned file Visual Studio Projects (12926) into directory file 5.
Recovering orphaned file SYSTEM~2 (22003) into directory file 5.
Recovering orphaned file system backup 21 sep 04 (22003) into directory file 5.
Recovering orphaned file TimeZone.msi (102917) into directory file 5.
Recovering orphaned file VS2005~1.ZIP (102918) into directory file 5.
Recovering orphaned file VS2005EE_EVAL.zip (102918) into directory file 5.
Recovering orphaned file sqlxml.msi (102929) into directory file 5.
Recovering orphaned file VPC-AV~1 (102938) into directory file 5.
Recovering orphaned file VPC - Avalon CTP November 2004 (XP SP2) (102938) into d
irectory file 5.
Recovering orphaned file SQLSER~2 (102993) into directory file 5.
Recovering orphaned file SYSTEM~3 (103719) into directory file 5.
Recovering orphaned file SystemFolder (103719) into directory file 5.
Recovering orphaned file srsp1.exe (103934) into directory file 5.
CHKDSK is verifying security descriptors (stage 3 of 3)...
Security descriptor verification completed.
CHKDSK is verifying Usn Journal...
Usn Journal verification completed.
Correcting errors in the Volume Bitmap.
Windows has made corrections to the file system.

 160079660 KB total disk space.
 157652756 KB in 91458 files.
     31184 KB in 12001 indexes.
         0 KB in bad sectors.
    177724 KB in use by the system.
     65536 KB occupied by the log file.
   2217996 KB available on disk.

      4096 bytes in each allocation unit.
  40019915 total allocation units on disk.
    554499 allocation units available on disk.

As you can see, it can actually fix things too. Wow!

Now, the moral of the story. Never ever enable the following things on removable harddrives:

  • Optimize for performance

    This setting enables write caching in Windows to improve disk performance. To disconnect this device from the computer, click the Safely Remove Hardware icon in the taskbar notification area.
    • Enable write caching on the disk

      This setting improves disk performance, but a power outage or equipment failure might result in data loss or corruption.
      • Enable advanced performance

        Recommended only for disks with a backup power supply. This setting further improves disk performance, but it also increases the risk of data loss if the disk loses power.

Guess what, I marked all checkboxes some time ago to speed up my machine when working in VPCs all the time. I should have been warned by all these nice messages. Maybe it would be even better if Windows would pop up a message box with an exclamation mark and a default button set to 'No'. Or just prohibit this on external harddrives. Now, I did revert the option to

  • Optimize for quick removal

    This setting disables write caching on the disk and in Windows, so you can disconnect this device without using the Safe Removal icon.

Well, this description is a little ameliorated I guess, so I still do use the safe removal icon for hardware removal. Most important however is the fact it will safe me from painful chkdsk experiences (I hope).

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under:

Comments

# re: Chkdsk saved my life

Monday, October 03, 2005 2:04 PM by bart

Well in my case, I was happily backing up data to a 200gb HDD, and, lo and behold, after a restart, on trying to access the folders in question windows happily beeped, told me 'my directory structure is corrupted' and generally behaved like a jackass. One restart later, and chkdsk starts its magic - goes through the 'correcting index' stage, then through a 'recovering file stage' - then stops or lack of disk space. And whinges about lack of disk space for every remaning file, all 50k or so of them. For a few hours or so.

New moral of the story : NTFS is ghey, you should leave lots of blank space when backing up to HDD's, and Mac OS/*nix doesn't do this kind of stuff.

# re: Chkdsk saved my life

Sunday, October 09, 2005 1:31 AM by bart

haha same thing just happened to me, backed up all my data to seagate 250gb and got the message 'cannot open folder, data corrupt'. I freaked the hell out! So much valuable stuff, came here saw what you fella's went through.

Ran a checkdsk... cried myself to sleep, at the thought of losing my baby.

Woke up, everything was perfect!

thank the lord for chkdisk

# re: Chkdsk saved my life

Sunday, May 21, 2006 5:03 AM by Wendy Telford

I just got this twice in a row:
CHKDSK is verifying indexes, etc.  correcting error in index $I30 for file 5.  what exactly does that mean?  Does it have something to do with my Iomega external drive?  Should I unplug it and uninstall it?
Thansk