This article was previously published under Q176970
When you try to run the chkdsk /f or chkdsk /f /r command on a shared cluster drive, Chkdsk may not run and may state that the drive could not be locked for exclusive use. If you schedule Chkdsk to run after the computer restarts, Chkdsk may generate the following error message during the startup process:
Cannot determine file system on drive \??\drive letter.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
892512 You receive an "Error: Access is denied" error message when you try to set the dirty bit on a mount point by using the fsutil utility in Windows Server 2003
Under most circumstances, running Chkdsk with the /F or /R switch requires the computer to be restarted because of open handles on the shared disk. Typically, there are no services or drivers running that prevent autochk (a derivative of Chkdsk) from checking the disk when the computer restarts. However, if you are using Windows Clustering, the file system does not mount the shared disk until the Cluster service starts because the owner of the shared disk is unknown. This causes Chkdsk to report that it cannot determine the file system on a shared cluster disk. Running Chkdsk in Read-Only mode may seem to work, but Chkdsk does not fix any problems.
If you suspect that there is file corruption on the shared disk, use the following steps to close all open handles to the shared disk and run Chkdsk on the drive:
Quit all programs and stop all non-cluster-aware services.
Start the Cluster Administrator tool, right-click the cluster name, and then click Properties.
On the Quorum tab, note which hard disk is the quorum hard disk. If the hard disk on which you want to run Chkdsk contains the quorum log, temporarily move the quorum to another shared disk.For more information, click the following article number to view the article in the Microsoft Knowledge Base:
Use the Cluster Administrator tool to find the group that contains the shared hard disk on which you want to run Chkdsk.
After you find the physical disk resource on which you want to run Chkdsk, take the entire group offline, including the shared disk. This closes all of the handles to the physical disk. To take the group offline, right-click the group name, and then click Take off-line.
In the Cluster Administrator tool, click the shared disk on which you want to run Chkdsk, and then bring it online. To do this, right-click the disk resource, and then click Bring on-line.
Note If the dirty bit was previously set, Chkdsk may automatically run and the Physical Disk resource may take awhile to come online. In Windows NT 4.0, you will see a Command Prompt window with Chkdsk running. In Windows 2000, if you open Task Manager you will see Chkdsk running as a process.
At a command prompt, change to a drive other than the drive on which you are attempting to run Chkdsk, and then type the following command, where X is the shared disk:
chkdsk x: /f /r
If you receive a "Disk cannot be locked" error message when you try to run Chkdsk, verify that all services and tools that have access to the drive are stopped, and then try to run Chkdsk again. Any running service or program that has an open handle to the drive can prevent Chkdsk from running. Windows 2000 and later versions of Windows can attempt to close open handles to the shared disk. If you are prompted to close open handles, press the Y key.
If handles remain open or the cluster contains a single shared disk
If programs or drivers maintain an open handle to the shared disk, or if there is only a single shared disk (on which the quorum log is stored), you must take the entire cluster down. Doing this requires that you disable the clustering components temporarily so that the file system can mount the shared disk when you restart the node. You must also shut down the other nodes in the cluster so that they do not take ownership of the shared disk when the node restarts.
To do this, use the steps in the appropriate section.
Windows Server 2003
You must put the physical disk resource in maintenance mode before you run a "chkdsk /F" command against a volume on a Microsoft Windows Server 2003-based computer. You must do this to prevent the physical disk resource from going into a failed state. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
903650 Extended maintenance mode functionality for cluster physical disk resources in Windows Server 2003
Quit all programs, stop all programs that are not cluster-aware, and then log on to the server with an account that has Administrative credentials.
Start Cluster Administrator, right-click cluster name, and then click Properties.
Click the Quorum tab, and then note which drive is the quorum disk. If the drive on which you want to run Chkdsk contains the quorum log, temporarily move the quorum disk to another shared drive.
Copy FSUtil.exe from the %SystemRoot%\System32 folder on a Windows XP-or-later-based computer to the local drive on the Windows 2000-based computer.
On the Windows 2000-based computer, at a command prompt, change to the folder that contains FSUtil.exe, and then type the following command, where drive is the shared drive:
fsutil dirty set drive:
Use Cluster Administrator to find the group that contains the shared drive on which you want to run Chkdsk.
Right-click the group name, and then click Take offline. This takes the whole group offline, including the shared drive, and closes all the handles to the physical drive.
Right-click the Physical Disk resource, and then click Bring Online. This brings the drive online. Chkdsk runs on the volume, and it may be in an "online pending" state for a while.
After Chkdsk runs on the volume, bring all other resources in the group online.
Windows NT 4.0
Turn off node B.
Log on to node A as an administrator.
Run the chkdsk /f command on the shared disk. When you are prompted to schedule Chkdsk to run when the computer next restarts, press Y.
In the Devices tool in Control Panel, click Cluster Disk, and then click Startup.
Change the Startup type to Disabled.
In the Services tool in Control Panel, click the Cluster Server service, and then click Startup.
Change the Startup type to Disabled.
Quit Control Panel, and then restart node A. Chkdsk runs without interference from the Cluster Disk driver or any other service.
After Chkdsk is finished, change the Startup type back to its original setting, and then restart the computer to activate the cluster.
Turn on node B.
For more information on Chkdsk and server clusters, click the following article numbers to view the articles in the Microsoft Knowledge Base:
265533 Explanation of Chkdsk status codes in Cluster Log
272244 Location of the Chkdsk results for Windows clustering resources
Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems, Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems, Microsoft Windows Server 2003, Datacenter Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Datacenter Server, Microsoft Windows NT Server 4.0 Enterprise Edition