Link to home
Start Free TrialLog in
Avatar of Smitty103097
Smitty103097

asked on

Running Disk Defragmenter in Windows XP Media Edition

When I attempt to run Disk Defragmenter I receive an error message that says, "Disk Defragmenter has detected that Chkdsk is scheduled to run on the volume: (C:).  Please run Chkdsk /f."   This error message does not come up when I run Disk Defragmenter on D: drive.

I have tried going to the Command Prompt and running chkdsk /f but receive a message that says, "Chkdsk cannot run because the volume is in use by another process.  Would you like to schedule this volume to be checked the next time the system restarts?  (Y/N)"

What can I do in order to run Disk Defragmenter on volume C:?
Avatar of Kenneniah
Kenneniah

Say yes, reboot, and let chkdsk run.
Avatar of Smitty103097

ASKER

I've tried that but chkdsk does not run after rebooting and the same error message appears when I try running disk defragmenter.
Hmm, ok check the dirty bit on the drive. Go to a command prompt and type "fsutil dirty query C:"

Let me know what it says.
I would suggest that you do not worry about disk defragmentor. It will not gain you any speed and besides as you load new programs it will just place parts of it in various places on the HD. It used to be a valuable tool when HD s were small but now there is in my opinion no reason to run it. Also I have read that sometimes after running it one has to reinstall programs.

gonzal13(joe)
When I run "fsutil dirty query C:" it says:

Volume - C: is Dirty

Ok, could try using chkntfs.exe to schedule a chkdsk and see if that works. Again from a command prompt..
chkntfs /c c:

Reboot and see if chkdsk runs this time.

Heh, and fragmentation has nothing really to do with the size of a hard drive. It has everything to do with speed. Fragmented files take more time to load because it has to jump around the drive instead of loading in one contiguous block. Also have never heard of having to reinstall programs because of a defrag, unless someone turned off power to the computer during a defrag.
Well, to clarify, fragmentation does affect free space a little bit, but by far the main reason to defrag is speed and efficiency.
Running chkntfs did not work either.  Could it be that I'm running these executable programs at a Command Prompt inside Windows XP?  If so, I'm not sure how go into DOS while the computer is rebooting.
Avatar of theProfessa
I see you ran the "fsutil dirty query C:"

What you should do next is type in "CHKNTFS /X c:"  This will force windows NOT to run chkdsk at next startup.  That way it won't be "running a process when you DO try to run CHKDSK later on.

Reboot the computer and then run chkdsk this time with the flags /f  and /r
so type in: "CHKDSK /f /r c:" (without quotes)

Then run the FSUTIL again and it shouldn't say its dirty, restart the computer and then you'll be able to defrag
The running process is Windows itself. Chkdsk can never fix errors on the system volume while Windows is running on it.
It's not autocheck that is stopping defrag, it's the dirty flag.

"Could it be that I'm running these executable programs at a Command Prompt inside Windows XP?"
No you run those in a normal command prompt. What they do is set chkdsk to check the drive when you next reboot your computer. When working right, it will run chkdsk automatically the next time you reboot after running the command line.

Since that doesn't seem to be working, you might have to boot to your Windows XP cd and enter the recovery console and run chkdsk from there.
You can run chkdsk from the Run mode on xp pro. It takes a while.
Run defrag from the safe mode, still only once every 6 months or so. As I mentioned you still run the risk of HD corruption. It is really not worth it.

Joe
Yes you can run chkdsk at any time, but it cannot fix errors on any drive that has open files, and since Windows is running, it is using files on the C: drive, hence it has to schedule the fixes for the next reboot.


http://support.microsoft.com/default.aspx?scid=kb;en-us;315265
"Chkdsk requires exclusive access to a volume when it runs. Therefore, if one or more of the files are open on the disk drive you want to check, Chkdsk displays a prompt asking if you want schedule the disk check for the next time that you restart your computer."
If you type chkdsk while running windows it  will find errors in the files and folders.
Now if you type chkdsk /f chkdisk will say: Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts (Y/N)
ASKER CERTIFIED SOLUTION
Avatar of GinEric
GinEric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Correct, I never said you couldn't run chkdsk on the system drive, I said it can't FIX errors without the reboot :)
The problem for smitty seems to be that even after that, chkdsk isn't running at the next reboot to fix the errors and remove the dirty flag.
Wish MS would have put an option in chkntfs for removing the dirty flag on your own instead of just letting you turn it on. Then again, at least in this case, I probably wouldn't want defrag to run if there might be errors on the drive.
GinEric:
The comment above is directly from chkdisk while running windows and then after I went to run and typed chkdsk /f and it then gave me the second message.

Sincerely

Joe
Kenneniah:

I agree with you.

Joe
Not to mention that fragmented files as already stated cause the drive head to jump around a lot more than contigious files, which causes more wear and tear on the head mechanism. Defragmenting itself causes wear and tear, but not nearly as much as constantly having to jump around when reading every single fragmented file day in and day out.
And again, the only real possibility of data corruption is if there's a power loss during the defrag progress. Overall and over time, data is safer on a defragmented drive than a fragmented one. Either way however, it's good to keep current backups :P
Oops, meant to post this link http://support.microsoft.com/default.aspx?scid=kb;EN-US;314058
Follow the directions there to get into the recovery console and try running chkdsk from there.
Of course that assumes you do have an actual Windows XP disc instead of a manufacturer's recovery disc. If you don't might have to look into making a BartPE or other cd to run chkdsk from.
No problem gonza13, I guess it does sound more like a Windows error message.  He could also install a second Operating System, on the D Drive, boot to it, and clean up C from there.
GinEric:
"Either way however, it's good to keep current backups
I have a slave drive and Norton Ghost. I do a full backup once a month. I do not use the incremental backup option since I do not want  corrupted HD put on my D drive. I also back up my data folder daily.

Joe
Well, thanks all.  I'm sorry if I've been among the missing for a while, but sometimes real life is more fun that cyberspace.

Thanks LeeTutor

Thanks everyone else for the very informative discussion.

Now, any of you experts care to look at any of my new questions?
Sure:
Just give us your URLs

gonzal13(joe)
gonzal13, you can click on the questioner's name, this will take you to his profile page, and there you will see a list of his questions under the heading "Question History."