Defrag locks a file but never unlocks it RRS feed

  • Question

  • We have a Windows Data Storage Server 2003 cluster running several file shares. We use JKDefrag scheduled nightly to keep the drives defragmented. About every 3 months or so, a user will attempt to upload a file to his share on this cluster and fail partway through. We've determined that it is JKDefrag locking the file that prevents the upload from completing, and also prevents us from deleting the incomplete file and trying again. If we kill the JKDefrag process, the incomplete file can be deleted and reuploaded without problem.

    Since JKDefrag uses the Windows Defrag API, this seems to be an issue with Windows Defrag. Has anyone encountered a problem like this before? It seems like Defrag is finding the incomplete upload and attempts to defrag the file while it's still being written. Is there any way to configure the server to lock the file until it is complete so that Defrag can't touch it?


    Tuesday, November 18, 2014 6:35 PM


  • Hi,

    Windows Server 2003 is an old system so we may not able to provide enough troubleshooting steps.

    Though JKDefrag is using Windows Defrag API, It could still be a third party issue. Also I remember that in old system the build-in defragment will restart if the volume it is defraging edited - which is the reason why sometimes we choose to use a third party defragment tool on Windows XP/2003. If a volume is keep editing, the defragment process will never end. However this could help avoiding such kind of issues.

    I noticed that the defrag will be performed at night. If the issue is caused as you suspected, is there any chance to set a more specific defrag schedule? For example running on weekend night so that no one will upload files to that server.

    If you have any feedback on our support, please send to

    Wednesday, November 19, 2014 10:10 AM