fsutil behaviorfsutil behavior

适用于: Windows Server (半年通道) ,Windows Server 2019,Windows Server 2016,Windows 10,Windows Server 2012 R2,Windows 8.1,Windows Server 2012,Windows 8Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

查询或设置 NTFS 卷行为,其中包括:Queries or sets NTFS volume behavior, which includes:

  • 创建8.3 字符长度的文件名。Creating the 8.3 character-length file names.

  • 扩展 NTFS 卷上8.3 字符长度短文件名中使用的字符。Extending character use in 8.3 character-length short file names on NTFS volumes.

  • 在 NTFS 卷上列出目录时更新 上次访问时间 戳。Updating of the Last Access Time stamp when directories are listed on NTFS volumes.

  • 配额事件写入系统日志以及 NTFS 页面缓冲池和 NTFS 非分页池内存缓存级别所用的频率。The frequency with which quota events are written to the system log and to NTFS paged pool and NTFS non-paged pool memory cache levels.

  • 主文件表区域 (MFT 区域) 的大小。The size of the master file table zone (MFT Zone).

  • 当系统在 NTFS 卷上遇到损坏时,无提示删除数据。Silent deletion of data when the system encounters corruption on an NTFS volume.

  • 文件删除通知 (也称为剪裁或取消映射) 。File-delete notification (also known as trim or unmap).

语法Syntax

fsutil behavior query {allowextchar | bugcheckoncorrupt | disable8dot3 [<volumepath>] | disablecompression | disablecompressionlimit | disableencryption | disablefilemetadataoptimization | disablelastaccess | disablespotcorruptionhandling | disabletxf | disablewriteautotiering | encryptpagingfile | mftzone | memoryusage | quotanotify | symlinkevaluation | disabledeletenotify}

fsutil behavior set {allowextchar {1|0} | bugcheckoncorrupt {1|0} | disable8dot3 [ <value> | [<volumepath> {1|0}] ] | disablecompression {1|0} | disablecompressionlimit {1|0} | disableencryption {1|0} | disablefilemetadataoptimization {1|0} | disablelastaccess {1|0} | disablespotcorruptionhandling {1|0} | disabletxf {1|0} | disablewriteautotiering {1|0} | encryptpagingfile {1|0} | mftzone <Value> | memoryusage <Value> | quotanotify <frequency> | symlinkevaluation <symboliclinktype> | disabledeletenotify {1|0}}

参数Parameters

参数Parameter 说明Description
queryquery 查询文件系统行为参数。Queries the file system behavior parameters.
setset 更改文件系统行为参数。Changes the file system behavior parameters.
allowextchar {1|0}allowextchar {1|0} 允许 (1) 或不允许扩展字符集中 (0) 字符 (包括音调符号字符) 在 NTFS 卷上的8.3 字符长度短文件名中使用。Allows (1) or disallows (0) characters from the extended character set (including diacritic characters) to be used in 8.3 character-length short file names on NTFS volumes.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

Bugcheckoncorrupt {1|0}Bugcheckoncorrupt {1|0} 当 NTFS 卷损坏时,允许 (1) 或不允许 (0) 生成 bug 检查。Allows (1) or disallows (0) generation of a bug check when there is corruption on an NTFS volume. 此功能可用于在与自愈 NTFS 功能一起使用时防止 NTFS 无提示删除数据。This feature can be used to prevent NTFS from silently deleting data when used with the Self-Healing NTFS feature.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disable8dot3 [ ] {1|0}disable8dot3 [] {1|0} 禁用 (1) 或启用 (0) 在 FAT 和 NTFS 格式的卷上创建8.3 字符长度的文件名称。Disables (1) or enables (0) the creation of 8.3 character-length file names on FAT- and NTFS-formatted volumes. (可选)使用指定为驱动器名称后跟冒号或 GUID 的 volumepath 前缀。Optionally, prefix with the volumepath specified as a drive name followed by a colon or GUID.
disablecompression {1|0}disablecompression {1|0} 禁用 ** (1) ** 或启用 ** (0) ** NTFS 压缩。Disables (1) or enables (0) NTFS compression.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disablecompressionlimit {1|0}disablecompressionlimit {1|0} 禁用 ** (1) ** 或 ** (0) ** ntfs 卷上的 ntfs 压缩限制。Disables (1) or enables (0) NTFS compression limit on NTFS volume. 压缩文件达到特定的碎片级别时,而不是扩展文件时,NTFS 将停止压缩文件的其他区。When a compressed file reaches a certain level of fragmentation, rather than failing to extend the file, NTFS stops compressing additional extents of the file. 这样做是为了允许压缩文件比平时更大。This was done to allow compressed files to be larger than they normally would be. 如果将此值设置为 TRUE,则 将禁用限制系统上压缩文件大小的此功能。Setting this value to TRUE disables this feature which limits the size of compressed files on the system. 不建议禁用此功能。We don't recommend disabling this feature.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disableencryption {1|0}disableencryption {1|0} 禁用 ** (1) ** 或启用 ** (0) ** NTFS 卷上的文件夹和文件的加密。Disables (1) or enables (0) the encryption of folders and files on NTFS volumes.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disablefilemetadataoptimization {1|0}disablefilemetadataoptimization {1|0} 禁用 ** (1) ** 或启用 ** (0) ** 文件元数据优化。Disables (1) or enables (0) file metadata optimization. NTFS 对给定文件可以具有的区数有限制。NTFS has a limit on how many extents a given file can have. 压缩文件和稀疏文件可能会产生很大的碎片。Compressed and sparse files can become very fragmented. 默认情况下,NTFS 会定期压缩其内部元数据结构,以允许更多的碎片文件。By default, NTFS periodically compacts its internal metadata structures to allow for more fragmented files. 如果将此值设置为 TRUE,则 将禁用此内部优化。Setting this value to TRUE disables this internal optimization. 不建议禁用此功能。We don't recommend disabling this feature.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disablelastaccess {1|0}disablelastaccess {1|0} 禁用 (1) 或者在 NTFS 卷上列出目录时,使 (0) 更新到每个目录上的最后一个访问时间戳。Disables (1) or enables (0) updates to the Last Access Time stamp on each directory when directories are listed on an NTFS volume.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disablespotcorruptionhandling {1|0}disablespotcorruptionhandling {1|0} 禁用 ** (1) ** 或启用 ** (0) ** 点损坏处理。Disables (1) or enables (0) spot corruption handling. 还允许系统管理员运行 CHKDSK 来分析卷的状态,而无需使其脱机。Also allows system administrators to run CHKDSK to analyze the state of a volume without taking it offline. 不建议禁用此功能。We don't recommend disabling this feature.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disabletxf {1|0}disabletxf {1|0} 禁用 ** (1) ** 或启用指定 NTFS 卷上 ** (0) ** txf。Disables (1) or enables (0) txf on the specified NTFS volume. TxF 是一项 NTFS 功能,可将语义(如语义)提供给文件系统操作。TxF is an NTFS feature that provides transaction like semantics to file system operations. 现在已弃用了 TxF,但该功能仍然可用。TxF is presently deprecated, but the functionality is still available. 不建议在 C:卷上禁用此功能。We don't recommend disabling this feature on the C: volume.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

disablewriteautotiering {1|0}disablewriteautotiering {1|0} 为分层卷禁用 ReFS v2 自动分层逻辑。Disables ReFS v2 auto tiering logic for tiered volumes.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

encryptpagingfile {1|0}encryptpagingfile {1|0} 加密 (1) 或不对 Windows 操作系统中的内存分页文件 (0 进行加密) 。Encrypts (1) or doesn't encrypt (0) the memory paging file in the Windows operating system.

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

mftzone <value>mftzone <value> 设置 MFT 区的大小,并将其表示为200MB 单元的倍数。Sets the size of the MFT Zone, and is expressed as a multiple of 200MB units. 设置为介于 1 (默认值为 200 mb) 到 4 (最大值为 800 mb) 。Set value to a number from 1 (default is 200 MB) to 4 (maximum is 800 MB).

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

memoryusage <value>memoryusage <value> 配置 NTFS 分页池内存和 NTFS 非分页缓冲池内存的内部缓存级别。Configures the internal cache levels of NTFS paged-pool memory and NTFS nonpaged-pool memory. 设置为 12Set to 1 or 2. 如果设置为 1 (默认) ,NTFS 将使用默认的分页池内存量。When set to 1 (the default), NTFS uses the default amount of paged-pool memory. 设置为 2时,NTFS 将增加其后备链表列表和内存阈值的大小。When set to 2, NTFS increases the size of its lookaside lists and memory thresholds. (后备链表列表是固定大小内存缓冲区的池,内核和设备驱动程序将其创建为文件系统操作的专用内存缓存,如读取文件。 ) (A lookaside list is a pool of fixed-size memory buffers that the kernel and device drivers create as private memory caches for file system operations, such as reading a file.)

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

quotanotify <frequency>quotanotify <frequency> 配置在系统日志中报告 NTFS 配额冲突的频率。Configures how frequently NTFS quota violations are reported in the system log. 的有效值范围是 0 – 4294967295Valid values for are in the range 0 – 4294967295. 默认频率为 3600 秒 (一小时) 。The default frequency is 3600 seconds (one hour).

您必须重新启动计算机才能使此参数生效。You must restart your computer for this parameter to take effect.

symlinkevaluation <symboliclinktype>symlinkevaluation <symboliclinktype> 控制可以在计算机上创建的符号链接的种类。Controls the kind of symbolic links that can be created on a computer. 有效选项包括:Valid choices are:
  • 1 -本地到本地符号链接, L2L:{0|1}1 - Local to local symbolic links, L2L:{0|1}
  • 2 -本地到远程符号链接, L2R:{1|0}2 - Local to remote symbolic links, L2R:{1|0}
  • 3 -远程到本地符号链接, R2R:{1|0}3 - Remote to local symbolic links, R2R:{1|0}
  • 4 -远程到远程符号链接, R2L:{1|0}4 - Remote to remote symbolic links, R2L:{1|0}
disabledeletenotifydisabledeletenotify 禁用 (1) 或启用 (0) 删除通知。Disables (1) or enables (0) delete notifications. 删除通知 (也称为剪裁或取消映射) 是一项功能,它将已释放的群集的基础存储设备通知为文件删除操作。Delete notifications (also known as trim or unmap) is a feature that notifies the underlying storage device of clusters that have been freed due to a file delete operation. 此外:In addition:
  • 对于使用 ReFS v2 的系统,默认情况下,修整处于禁用状态。For systems using ReFS v2, trim is disabled by default.
  • 对于使用 ReFS v1 的系统,默认情况下会启用 trim。For systems using ReFS v1, trim is enabled by default.
  • 对于使用 NTFS 的系统,默认情况下会启用剪裁,除非管理员禁用了它。For systems using NTFS, trim is enabled by default unless an administrator disables it.
  • 如果硬盘驱动器或 SAN 报告其不支持剪裁,则硬盘驱动器和 San 不会获取剪裁通知。If your hard disk drive or SAN reports that it doesn't support trim, then your hard disk drive and SANs don't get trim notifications.
  • 启用或禁用不需要重新启动。Enabling or disabling doesn't require a restart.
  • 当发出下一个取消映射命令时,Trim 将有效。Trim is effective when the next unmap command is issued.
  • 现有的即时 IO 不受注册表更改的影响。Existing inflight IO are not impacted by the registry change.
  • 启用或禁用 trim 后,不需要重新启动任何服务。Doesn't require any service restart when you enable or disable trim.

注解Remarks

  • MFT 区是一个保留区域,它使主文件表 (MFT) 根据需要进行扩展,以防止 MFT 碎片。The MFT Zone is a reserved area that enables the master file table (MFT) to expand as needed to prevent MFT fragmentation. 如果卷上的平均文件大小为 2 KB 或更小,则将 mftzone 值设置为 2可能会很有用。If the average file size on the volume is 2 KB or less, it can be beneficial to set the mftzone value to 2. 如果卷上的平均文件大小为 1 KB 或更小,则将 mftzone 值设置为 4会很有用。If the average file size on the volume is 1 KB or less, it can be beneficial to set the mftzone value to 4.

  • 如果将 disable8dot3 设置为 0,则每次创建具有较长文件名的文件时,NTFS 都会创建一个具有8.3 个字符长度的第二个文件项。When disable8dot3 is set to 0, every time you create a file with a long file name, NTFS creates a second file entry that has an 8.3 character-length file name. NTFS 在目录中创建文件时,必须查找与长文件名关联的8.3 字符长度的文件名。When NTFS creates files in a directory, it must look up the 8.3 character-length file names that are associated with the long file names. 此参数更新 HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation 注册表项。This parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation registry key.

  • Allowextchar参数将更新HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsAllowExtendedCharacterIn8dot3Name注册表项。The allowextchar parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsAllowExtendedCharacterIn8dot3Name registry key.

  • Disablelastaccess参数可降低日志记录更新对文件和目录上最后访问时间戳的影响。The disablelastaccess parameter reduces the impact of logging updates to the Last Access Time stamp on files and directories. 禁用 " 上次访问时间 " 功能可提高文件和目录访问的速度。Disabling the Last Access Time feature improves the speed of file and directory access. 此参数更新 HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate 注册表项。This parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate registry key.

    注意:Notes:

    • 即使所有磁盘上的值不是最新的,基于文件的 上次访问时间 查询也是准确的。File-based Last Access Time queries are accurate even if all on-disk values aren't current. NTFS 为查询返回正确的值,因为准确的值存储在内存中。NTFS returns the correct value on queries because the accurate value is stored in memory.

    • 一小时是 NTFS 可以延迟更新磁盘上的 上次访问时间 的最长时间。One hour is the maximum amount of time that NTFS can defer updating Last Access Time on disk. 如果 NTFS 更新其他文件属性(如 " 上次修改时间"),并且 " 上次访问时间 " 更新处于挂起状态,则 NTFS 将 上次访问时间 与其他更新进行更新,而不会对性能产生额外的影响。If NTFS updates other file attributes such as Last Modify Time, and a Last Access Time update is pending, NTFS updates Last Access Time with the other updates without additional performance impact.

    • Disablelastaccess参数可能会影响依赖于此功能的程序,例如备份和远程存储。The disablelastaccess parameter can affect programs such as Backup and Remote Storage, which rely on this feature.

  • 增加物理内存不会始终增加 NTFS 可用的分页池内存量。Increasing the physical memory doesn't always increase the amount of paged pool memory available to NTFS. memoryusage 设置为 2 将引发分页池内存的限制。Setting memoryusage to 2 raises the limit of paged pool memory. 如果系统打开并关闭了同一文件集中的多个文件,并且尚未对其他应用或缓存内存使用大量系统内存,这可能会提高性能。This might improve performance if your system is opening and closing many files in the same file set and is not already using large amounts of system memory for other apps or for cache memory. 如果计算机已将大量系统内存用于其他应用或缓存内存,则增加 NTFS 分页和非分页池内存的限制将减少其他进程的可用池内存。If your computer is already using large amounts of system memory for other apps or for cache memory, increasing the limit of NTFS paged and non-paged pool memory reduces the available pool memory for other processes. 这可能会降低整体系统性能。This might reduce overall system performance. 此参数更新 HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsMemoryUsage 注册表项。This parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsMemoryUsage registry key.

  • mftzone 参数中指定的值是在新卷上,mft 的初始大小加上 mft 区的近似值,并为每个文件系统在装入时设置。The value specified in the mftzone parameter is an approximation of the initial size of the MFT plus the MFT Zone on a new volume, and it is set at mount time for each file system. 由于使用的是卷上的空间,因此 NTFS 会调整保留的空间,以备今后 MFT 增长。As space on the volume is used, NTFS adjusts the space reserved for future MFT growth. 如果 MFT 区域已经很大,则不会再次保留完整的 MFT 区域大小。If the MFT Zone is already large, the full MFT Zone size is not reserved again. 因为 MFT 区域基于 MFT 末尾之后的连续范围,所以在使用空间时,将会收缩。Because the MFT Zone is based on the contiguous range past the end of the MFT, it shrinks as the space is used.

    在完全使用当前 MFT 区域之前,文件系统不会确定新的 MFT 区域位置。The file system doesn't determine the new MFT Zone location until the current MFT Zone is completely used. 请注意,此操作永远不会出现在典型的系统上。Note that this never occurs on a typical system.

  • 当 "删除通知" 功能打开时,某些设备可能会遇到性能下降。Some devices may experience performance degradation when the delete notification feature is turned on. 在这种情况下,请使用 disabledeletenotify 选项关闭通知功能。In this case, use the disabledeletenotify option to turn off the notification feature.

示例Examples

若要查询使用 GUID "{928842df-5a01-11de-a85c-806e6f6e6963}" 指定的磁盘卷的 "禁用8dot3 名称" 行为,请键入:To query for the disable 8dot3 name behavior for a disk volume specified with the GUID, {928842df-5a01-11de-a85c-806e6f6e6963}, type:

fsutil behavior query disable8dot3 volume{928842df-5a01-11de-a85c-806e6f6e6963}

还可以使用 8dot3name 子命令查询8dot3 名称行为。You can also query the 8dot3 name behavior by using the 8dot3name subcommand.

若要查询系统以查看是否已启用剪裁,请键入:To query the system to see if TRIM is enabled or not, type:

fsutil behavior query DisableDeleteNotify

这会生成类似于下面的输出:This yields an output similar to this:

NTFS DisableDeleteNotify = 1
ReFS DisableDeleteNotify is not currently set

若要覆盖 ReFS v2 (disabledeletenotify) 的默认行为,请键入:To override the default behavior for TRIM (disabledeletenotify) for ReFS v2, type:

fsutil behavior set disabledeletenotify ReFS 0

若要为 NTFS 和 ReFS v1 替代 TRIM (disabledeletenotify) 的默认行为,请键入:To override the default behavior for TRIM (disabledeletenotify) for NTFS and ReFS v1, type:

fsutil behavior set disabledeletenotify 1

其他参考Additional References