共用方式為


DiskRunChkDsk

Determines whether the operating system runs chkdsk on a physical disk before attempting to mount the disk. The following table summarizes the attributes of the DiskRunChkDsk property.

Attribute Value
Data type
DWORD
Access
Read/write
Status
Optional
Structure
CLUSPROP_DWORD
Minimum
0
Maximum
6
Default
0

The possible values for this property are:

Value Description
0x0 Verify whether the dirty bit is set on the volume, and then perform a normal check on the file system. If the dirty bit is set, or if the normal check returns STATUS_FILE_CORRUPT_ERROR or STATUS_DISK_CORRUPT_ERROR, chkdsk is started in verbose mode.
0x1 Verify whether the dirty bit is set on the volume, and then perform a verbose check on the file system. If the dirty bit is set or if the verbose check returns STATUS_FILE_CORRUPT_ERROR, chkdsk is started in normal mode.
0x2 Run chkdsk in verbose mode on the volume every time it is mounted.
0x3 Verify whether the dirty bit is set on the volume, and then perform a normal check on the file system.
0x4 Don't perform any checks.
0x5 Verify whether the dirty bit is set on the volume, and then perform a verbose check on the file system. If a problem is found, chkdsk is started and the volume is not brought online.

Remarks

Forcing a disk to mount despite errors can result in loss of data. Use caution when changing these properties.

Note

The chkdsk tool cannot be run on a cluster shared volume (CSV) that is operating in redirected mode.

Examples

The property value portion of a property list entry for DiskRunChkDsk can be set with the following example code.

DWORD          DiskRunChkdskData = 5;
CLUSPROP_DWORD DiskRunChkdskValue;

DiskRunChkdskValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_DWORD;
DiskRunChkdskValue.cbLength  = sizeof(DWORD);
DiskRunChkdskValue.dw        = DiskRunChkdskData;

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Datacenter, Windows Server 2008 Enterprise

See also

Physical Disk Private Properties

ConditionalMount

SkipChkdsk