非正常关机
当 Unraid 检测到 array 没有在系统断电前正确停止时,就会出现不干净关机。这种情况可能会在下次启动时触发自动 parity check 以确保数据完整性。
采取一些主动的步骤可以帮助你避免或识别非正常关机:
- **使用不间断电源(UPS):**确保服务器连接到UPS并设置在电池电量不足时自动关闭。
- **尝试优雅关闭:**如果您的服务器无响应,短按电源按钮以触发安全关闭。不要长按该按钮,因为这将强制硬关机并导致不洁关机。
- 启用持久日志记录:前往设置 → 系统日志服务器以激活在重新启动后持久存在的日志记录。详细信息请参阅持久日志 (系统日志服务器)。
- 附加诊断信息以获得支持: 如果发生非正常关机,Unraid 将尝试将诊断信息保存到您的闪存设备的
/log/diagnostics.zip中。当您寻求帮助时,请将此文件附加到论坛帖子中。
导致非正常关机的事件
了解导致不洁关机的主要触发因素有助于您防止此类事件发生。探索下方选项卡以获取每种情况的详细信息。
- “意外的电源损失”
- “闪存驱动器故障”
- 打开终端会话
Power interruptions are one of the main reasons for unclean shutdowns. Protect your system with a properly configured UPS that can automatically shut down Unraid before the battery runs out.
Unraid 支持大多数使用 apcupsd 协议 协议的 UPS 单元(APC 和 CyberPower 通常兼容)。如果您的 UPS 不受支持,建议使用来自社区应用程序的网络 UPS 工具(NUT)插件。
Unraid waits for all open terminal or SSH sessions to close during shutdown. If these sessions remain active and the shutdown timer expires, a forced shutdown occurs.
The Dynamix Stop Shell plugin can automatically close lingering bash or SSH sessions, helping ensure a graceful shutdown. However, be cautious if there are ongoing write operations to the array.
配置关机超时
Properly configuring shutdown timeouts is essential to ensure your Unraid server can stop all services effectively, preventing unclean shutdowns, particularly during power loss or maintenance. Each component of your system - VMs, Docker containers, and the overall array - has its own timeout setting that can be adjusted.