Cloud Service Worker Role Workerrole突然停机,查看Events,发现是错误源为 Defrag。
错误消息:
The volume Windows was not optimized because an error was encountered: Neither Slab Consolidation nor Slab Analysis will run if slabs are less than 8 MB. (0x8900002D)
Events 截图:
defrag的作用为Windows 系统在本地卷上查找和合并碎片文件以提高系统性能,在云服务的实例中,以计划任务的方式启动,默认携带参数为 “-c -h -o -k”, 对应的目的为:
而错误 “The volume Windows was not optimized because an error was encountered: Neither Slab Consolidation nor Slab Analysis will run if slabs are less than 8 MB. (0x8900002D)” 是因为系统执行ScheduledDefrag 任务时候出错。在大多数情况下,这是由 -k 参数引起的,该参数告诉碎片整理程序对所选卷执行块合并。这将导致小于 8 MB 的块出现错误,并且通常会在 HyperV VM 上引发错误。解决方案为在参数中移除 “-k”。
The volume (DRIVE:) was not optimized because an error was encountered: Neither Slab Consolidation nor Slab Analysis will run if slabs are less than 8 MB. (0x8900002D):http://blog.shawnhyde.com/post/2013/11/29/the-volume-drive-was-not-optimized-because-an-error-was-encountered-neither-slab-consolidation-nor-slab-analysis-will-run-if-slabs-are-less-than-8-mb-0x8900002d
defrag:https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/defrag