ECS:xDoctor RAP137 ECS 机架中的总 SWAP 内存不一致
Summary: ECS 机架的总交换内存不一致。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
xDoctor 报告:
------------------------------------------------------------
WARNING - Total swap memory inconsistent across the ECS rack
------------------------------------------------------------
Node = Nodes
Extra = {'Nodes': {'16383': ['169.254.1.8', '169.254.1.7', '169.254.1.6', '169.254.1.4', '169.254.1.3', '169.254.1.2', '169.254.1.1'], '8191': ['169.254.1.5']}}
Timestamp = 2022-12-01_145111
PSNT = CKM00190800120 @ 4.8-87.0Cause
- 节点重新启动后,交换配置未保存在
/etc/fstab. - 启动时未加载本机 SWAP 分区。
- 节点已重新映像,SWAP 未应用于节点。
- 从未对具有扩展的群集应用更多 SWAP。
- 确认所有节点上的 SWAP 是否一致。
提醒:我们看到下面的输出显示机架 1 节点 1 只有 8 G SWAP,与群集不匹配。
命令:
# doit free -m | grep Swap
示例:
admin@ecsnode1:~> svc_exec 'free -m | grep Swap' svc_exec v1.0.4 (svc_tools v2.8.0) Started 2022-11-30 22:15:56 Output from node: r1n1 retval: 0 Swap: 8191 552 23 Output from node: r1n2 retval: 0 Swap: 8191 2 8191 Output from node: r1n3 retval: 0 Swap: 16383 4 16379 Output from node: r1n4 retval: 0 Swap: 16383 0 16383 Output from node: r1n5 retval: 0 Swap: 16383 0 16383 Output from node: r1n6 retval: 0 Swap: 16383 3 16380 Output from node: r1n7 retval: 0 Swap: 16383 4 16379 Output from node: r1n8 retval: 0 Swap: 16383 699 15684
- 确认 /etc/fstab 是否已更新为在节点上使用额外的 8 GB SWAP,以及是否存在本机 SWAP 分区条目。
命令:
# svc_exec 'grep swap /etc/fstab'
示例:
admin@ecsnode1:~> svc_exec 'grep swap /etc/fstab' svc_exec v1.0.4 (svc_tools v2.8.0) Started 2022-11-30 22:19:21 Output from node: r1n1 retval: 0 LABEL=SWAP swap swap defaults 0 0 <-- missing extended swap partition Output from node: r1n2 retval: 0 /swapfile swap swap defaults 0 0 <-- missing native swap partition Output from node: r1n3 retval: 0 LABEL=SWAP swap swap defaults 0 0 /swapfile swap swap defaults 0 0 Output from node: r1n4 retval: 0 LABEL=SWAP swap swap defaults 0 0 /swapfile swap swap defaults 0 0 Output from node: r1n5 retval: 0 LABEL=SWAP swap swap defaults 0 0 /swapfile swap swap defaults 0 0 Output from node: r1n6 retval: 0 LABEL=SWAP swap swap defaults 0 0 /swapfile swap swap defaults 0 0 Output from node: r1n7 retval: 0 LABEL=SWAP swap swap defaults 0 0 /swapfile swap swap defaults 0 0 Output from node: r1n8 retval: 0 LABEL=SWAP swap swap defaults 0 0 /swapfile swap swap defaults 0 0
- 验证是否所有节点上都存在 SWAP 文件。
命令:
# svc_exec 'ls -lh /swapfile'示例:
admin@ecsnode1:~> svc_exec 'ls -lh /swapfile' svc_exec v1.0.4 (svc_tools v2.8.0) Started 2022-11-30 22:26:48 Output from node: r1n1 retval: 0 ls: cannot access '/swapfile': No such file or directory Output from node: r1n2 retval: 0 -rw------- 1 root root 8.0G Feb 11 2022 /swapfile Output from node: r1n3 retval: 0 -rw------- 1 root root 8.0G Feb 11 2022 /swapfile Output from node: r1n4 retval: 0 -rw------- 1 root root 8.0G Feb 11 2022 /swapfile Output from node: r1n5 retval: 0 -rw------- 1 root root 8.0G Feb 11 2022 /swapfile Output from node: r1n6 retval: 0 -rw------- 1 root root 8.0G Feb 11 2022 /swapfile Output from node: r1n7 retval: 0 -rw------- 1 root root 8.0G Feb 11 2022 /swapfile Output from node: r1n8 retval: 0 -rw------- 1 root root 8.0G Jul 26 02:03 /swapfile
Resolution
重要提示!xDoctor 4-8.104.0 及更高版本中发布了一项新功能。此知识库 (KB) 现已通过 xDoctor AutoPilot 实现自动化,可解决大多数问题,而无需支持人员参与。
此功能在 xDoctor 4-8.104.0 及更高版本中是原生的,有关语法和使用问题,请参阅 ECS:ObjectScale:如何运行 KB 自动化脚本 (Auto Pilot)。(可能需要登录戴尔支持)
- 从具有 xDoctor 4-8.104.0 及更高版本的主节点运行自动化命令。
注意:--target-node, --target-rack and --target-vdc此脚本支持。
命令:
# sudo xdoctor autopilot --kb 205933 --target-node <NAN IP> # sudo xdoctor autopilot --kb 205933 --target-rack <Rack Name> # sudo xdoctor autopilot --kb 205933 --target-vdc <VDC Name>
示例:
admin@ecsnode1:~> sudo xdoctor autopilot --kb 205933 --target-node 169.254.1.1 Checking for existing screen sessions... Starting screen session 'autopilot_kb_205933_20250627_212503'... Screen session 'autopilot_kb_205933_20250627_212503' started successfully. Attaching to screen session 'autopilot_kb_205933_20250627_212503'...
-
查看所执行作的摘要。
示例:
TASK [Summary for SWAP and fstab issues addressed] *********************************************************************************************************************************************
ok: [169.254.1.7] => {
"msg": [
"************************************************************************************************************************************************",
"************************************************************************************************************************************************",
" An 8GB swap file was created and configured as /swapfile with swap enabled. ",
" fstab was updated with entries for /swapfile, and a backup prior to the change was created in: /etc/fstab.28734.2024-08-28@19:44:38~. ",
" No duplicate entries were found in fstab. ",
"************************************************************************************************************************************************",
"************************************************************************************************************************************************"
]
}
-
确认使用交换详细信息和应用的更改更新 MOTT。
注意:如果您当前的 MOTD 中包含 KB 编号或单词 /swapfile,则 MOTD 将不会更新。
命令:
# yes or no
示例:
The next steps are to detect keywords in the MOTD content and update the MOTD with custom content for the KB specifics. IMPORTANT! You will need customer permission to do this action for the KB. Would you like to proceed with the steps by typing 'Yes' or 'Y', or skip the MOTD update actions by typing 'No' or 'N': : y
-
查看用于添加新 MOTD 内容的 MOTD 更改摘要:
示例:
TASK [MOTD summary] ****************************************************************************************************************************************************************************
ok: [169.254.1.7] => {
"msg": [
"************************************************************************************************************************************************",
"New MOTD content:",
"************************************************************************************************************************************************",
"************************************************************************************************************************************************",
[
"",
"==============================================================================================================================================",
"2024-08-28 | SR#84955203 | KB 186358 has been applied to this system, adding an 8GB swap file to /swapfile. Please reapply if a node has been reimaged.",
"=============================================================================================================================================="
],
"************************************************************************************************************************************************",
"************************************************************************************************************************************************"
]
}
Affected Products
ECS ApplianceArticle Properties
Article Number: 000205933
Article Type: Solution
Last Modified: 24 Jul 2025
Version: 8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.