查询或设置 NTFS 卷行为,其中包括:
创建 8.3 个字符长度的文件名。
扩展 NTFS 卷上 8.3 个字符长度短文件名中的字符使用。
当目录在 NTFS 卷上列出时更新“上次访问时间”时间戳。
将配额事件写入系统日志以及 NTFS 分页池和 NTFS 非分页池内存缓存级别的频率。
主文件表区域(MFT 区域)的大小。
当系统在 NTFS 卷上遇到损坏时,无提示删除数据。
文件删除通知(也称为修剪或取消映射)。
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 |
---|---|
查询 | 查询文件系统行为参数。 |
set | 更改文件系统行为参数。 |
allowextchar {1|0} |
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. 必须重新启动计算机,此参数才会生效。 |
Bugcheckoncorrupt {1|0} |
Allows (1) or disallows (0) generation of a bug check when there is corruption on an NTFS volume. 此功能可用于防止 NTFS 在与自我修复 NTFS 功能一起使用时无提示删除数据。 必须重新启动计算机,此参数才会生效。 |
disable8dot3 [<volumepath> ] {1|0} |
Disables (1) or enables (0) the creation of 8.3 character-length file names on FAT- and NTFS-formatted volumes. Optionally, prefix with the volumepath specified as a drive name followed by a colon or GUID. |
disablecompression {1|0} |
Disables (1) or enables (0) NTFS compression. 必须重新启动计算机,此参数才会生效。 |
disablecompressionlimit {1|0} |
Disables (1) or enables (0) NTFS compression limit on NTFS volume. 当压缩文件达到特定的碎片级别时,NTFS 将停止压缩文件的其他盘区,而不是扩展文件失败。 这样做是为了允许压缩文件比正常情况下更大。 Setting this value to TRUE disables this feature which limits the size of compressed files on the system. 不建议禁用此功能。 必须重新启动计算机,此参数才会生效。 |
disableencryption {1|0} |
Disables (1) or enables (0) the encryption of folders and files on NTFS volumes. 必须重新启动计算机,此参数才会生效。 |
disableFileMetadataOptimization {1|0} |
Disables (1) or enables (0) file metadata optimization. NTFS 对给定文件可以具有的盘区数有限制。 压缩和稀疏文件可能会变得高度碎片化。 默认情况下,NTFS 会定期压缩其内部元数据结构,因而会产生碎片化程度更高的文件。 Setting this value to TRUE disables this internal optimization. 不建议禁用此功能。 必须重新启动计算机,此参数才会生效。 |
禁用 LastAccess {1|0} |
Disables (1) or enables (0) updates to the Last Access Time stamp on each directory when directories are listed on an NTFS volume. 必须重新启动计算机,此参数才会生效。 |
disableSpotCorruptionHandling {1|0} |
Disables (1) or enables (0) spot corruption handling. 还允许系统管理员运行 CHKDSK 来分析卷的状态,而无需使其脱机。 不建议禁用此功能。 必须重新启动计算机,此参数才会生效。 |
禁用 TxF {1|0} |
Disables (1) or enables (0) txf on the specified NTFS volume. TxF 是一项 NTFS 功能,可为文件系统操作提供类似事务语义的事务。 TxF 目前已弃用,但该功能仍然可用。 我们不建议在 C: 卷上禁用此功能。 必须重新启动计算机,此参数才会生效。 |
disablewriteautotiering {1|0} |
禁用分层卷的 ReFS v2 自动分层逻辑。 必须重新启动计算机,此参数才会生效。 |
encryptpaging文件 {1|0} |
Encrypts (1) or doesn't encrypt (0) the memory paging file in the Windows operating system. 必须重新启动计算机,此参数才会生效。 |
MFTZONE <value> |
设置 MFT 区域的大小,并表示为 200MB 单位的倍数。 Set value to a number from 1 (default is 200 MB) to 4 (maximum is 800 MB). 必须重新启动计算机,此参数才会生效。 |
memoryusage <value> |
配置 NTFS 页面缓冲池内存和 NTFS 非页面缓冲池内存的内部缓存级别。 Set to 1 or 2. When set to 1 (the default), NTFS uses the default amount of paged-pool memory. When set to 2, NTFS increases the size of its lookaside lists and memory thresholds. (后备列表是内核和设备驱动程序创建的固定大小的内存缓冲区池,作为文件系统操作(如文件读取)的专用内存缓存。) 必须重新启动计算机,此参数才会生效。 |
quotanotify <frequency> |
配置在系统日志中报告 NTFS 配额冲突的频率。 有效值的范围为 0–4294967295。 The default frequency is 3600 seconds (one hour). 必须重新启动计算机,此参数才会生效。 |
symlink评估 <symboliclinktype> |
控制可在计算机上创建的符号链接的类型。 有效选项包括:
|
disabledeletenotify | Disables (1) or enables (0) delete notifications. 删除通知(也称为修剪或取消映射)功能可通知底层存储设备由于文件删除操作而释放的群集。 In addition:
|
Remarks
MFT 区域是一个保留区域,它使主文件表 (MFT) 能够根据需要扩展以防止 MFT 碎片。 If the average file size on the volume is 2 KB or less, it can be beneficial to set the mftzone value to 2. If the average file size on the volume is 1 KB or less, it can be beneficial to set the mftzone value to 4.
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 个字符长度的文件名。 This parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation registry key.
The allowextchar parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsAllowExtendedCharacterIn8dot3Name registry key.
The disablelastaccess parameter reduces the impact of logging updates to the Last Access Time stamp on files and directories. 禁用“上次访问时间”功能可提高文件和目录访问的速度。 This parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate registry key.
Notes:
基于文件的“上次访问时间”查询是准确的,即使磁盘上的所有值都不是最新的。 NTFS 在查询时返回正确的值,因为准确的值存储在内存中。
NTFS 可以将更新磁盘上“上次访问时间”的时间最长延迟一小时。 如果 NTFS 更新其他文件属性(如“上次修改时间”),并且“上次访问时间”更新挂起,则 NTFS 将使用其他更新来更新“上次访问时间”,而不会对性能产生额外影响。
The disablelastaccess parameter can affect programs such as Backup and Remote Storage, which rely on this feature.
增加物理内存并不一定会增加 NTFS 可用的页面缓冲池内存量。 Setting memoryusage to 2 raises the limit of paged pool memory. 如果你的系统正在打开和关闭同一文件集中的许多文件,并且尚未将大量系统内存用于其他应用程序或缓存,则这样设置可能会提高性能。 如果你的计算机已将大量系统内存用于其他应用或缓存内存,则增加 NTFS 页面缓冲和非页面缓冲池内存的限制会减少其他进程的可用池内存。 这可能会降低整体系统性能。 This parameter updates the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsMemoryUsage registry key.
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 增长预留的空间。 如果 MFT 区域已经很大,则不会再次预留完整的 MFT 区域大小。 由于 MFT 区域是基于超过 MFT 末端的连续范围,因此会随着空间被使用而缩小。
在当前 MFT 区域被用完之前,文件系统不会确定新的 MFT 区域位置。 请注意,典型系统上永远不会发生这种情况。
开启删除通知功能时,某些设备可能会遇到性能下降的情况。 In this case, use the disabledeletenotify option to turn off the notification feature.
Examples
若要查询使用 GUID {928842df-5a01-11de-a85c-806e6f6e6963} 指定的磁盘卷的禁用 8dot3 名称行为,请键入:
fsutil behavior query disable8dot3 volume{928842df-5a01-11de-a85c-806e6f6e6963}
You can also query the 8dot3 name behavior by using the 8dot3name subcommand.
要查询系统以确认是否启用了 TRIM,请键入:
fsutil behavior query DisableDeleteNotify
这会生成如下所示的输出:
NTFS DisableDeleteNotify = 1
ReFS DisableDeleteNotify is not currently set
若要替代 ReFS v2 的 TRIM (disabledeletenotify) 的默认行为,请键入:
fsutil behavior set disabledeletenotify ReFS 0
若要替代 NTFS 和 ReFS v1 的 TRIM(禁用删除通知)的默认行为,请键入:
fsutil behavior set disabledeletenotify 1