ECS:如何添加或删除 DNS 服务器
摘要: 本文介绍如何修改 ECS DNS 配置。
本文适用于
本文不适用于
本文并非针对某种特定的产品。
本文并非包含所有产品版本。
说明
重要说明:ECS 功能在很大程度上依赖于正确的 DNS 解析。如果 DNS 无法正常工作,可能会导致 数据不可用 (DU) 状态。
在更改 DNS 设置之前,请务必与客户确认。
提醒:xDoctor 4-8.104.0 及更高版本中发布了一项新功能。现在,xDoctor 会自动执行此作,以快速尝试发现 xDoctor RAP075 错误的潜在原因。如果脚本无法纠正 xDoctor RAP075 错误,它将提供其调查结果的详细摘要。
有关更多信息,请遵循文章 ECS:ObjectScale:如何运行 KB 自动化脚本 (Auto Pilot)(需要以注册的戴尔支持用户身份登录才能查看本文)。如果您无法升级到 xDoctor 4.8.104 或更高版本,请按照本文的 “手动”部分 进行作。
Process:
- 要查找机架的主节点,请执行以下作:
命令:
# ssh master.rack
示例:
admin@ecsnode5:~> ssh master.rack admin@ecsnode1:~>
- 要查找 NAN IP,您可以通过以下脚本将警报中标识的 IP 或目标的 getclusterinfo -i 中使用的 IP:
命令:
# getclusterinfo -i
示例:
admin@ecsnode1:~> getclusterinfo -i Registered Racks ================ Ip Address epoxy seg mac seg color seg id NAN Hostname =============== ===== ================= ========== ======= ============ 169.254.1.1 False 00:00:00:00:00:00 red 1 provo-red.nanlocal Node private Node Public BMC Ip Address Id Status Mac Ip Address Mac Ip Address Private.4(NAN) Node Name =============== ====== ====== ================= =============== ================= =============== =============== ========= 192.168.219.1 1 MA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.101 169.254.1.1 provo-red 192.168.219.2 2 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.102 169.254.1.2 sandy-red 192.168.219.3 3 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.103 169.254.1.3 orem-red 192.168.219.4 4 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.104 169.254.1.4 ogden-red 192.168.219.5 5 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.105 169.254.1.5 layton-red 192.168.219.6 6 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.106 169.254.1.6 logan-red 192.168.219.7 7 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.107 169.254.1.7 lehi-red 192.168.219.8 8 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.108 169.254.1.8 murray-red Status: M - Master, S - Slave E - Epoxy I - Initializing, U - Updating, A - Active P - On, O - Off ! - Warning/Error list: 1 -(W) Hostname set to default hostname set by installer 169.254.2.1 False 00:00:00:00:00:00 green 2 tucson-green.nanlocal Node private Node Public BMC Ip Address Id Status Mac Ip Address Mac Ip Address Private.4(NAN) Node Name =============== ====== ====== ================= =============== ================= =============== =============== ========= 192.168.219.1 1 MA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.101 169.254.2.1 provo-green 192.168.219.2 2 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.102 169.254.2.2 sandy-green 192.168.219.3 3 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.103 169.254.2.3 orem-rgreen 192.168.219.4 4 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.104 169.254.2.4 ogden-green 192.168.219.5 5 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.105 169.254.2.5 layton-green 192.168.219.6 6 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.106 169.254.2.6 logan-green 192.168.219.7 7 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.107 169.254.2.7 lehi-green 192.168.219.8 8 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.108 169.254.2.8 murray-green Status: M - Master, S - Slave E - Epoxy I - Initializing, U - Updating, A - Active P - On, O - Off ! - Warning/Error list: 1 -(W) Hostname set to default hostname set by installer
- 从具有 xDoctor 4-8.104.0 及更高版本的主节点运行自动化命令。 此自动化由菜单驱动,在整个执行过程中包含验证步骤。
提醒:在添加新的 DNS 服务器 IP 之前,将进行以下验证:
-
- 验证正向 DNS 查找。
- 验证反向 DNS 查找。
- 验证并显示 DNS 查找不匹配。
命令:
# sudo xdoctor autopilot --kb 19614 --target-rack <rack color>
示例:(在此示例中,我们使用的是机架 1)
admin@ecsnode1:~> sudo xdoctor autopilot --kb 19614 --target-rack red Using /etc/ansible/ansible.cfg as config file VERSION: 3.0 Playbook tasks: 66 Role tasks: 28 Total tasks: 94 across 1 host(s)
自动化脚本选项:
- 选择要执行的选项:将 DNS 服务器添加到配置或从配置中删除 DNS 服务器。
TASK [Ask user if they want to change DNS IP configuration or DNS search configuration] ********************************************************************************************************************** [Ask user if they want to change DNS IP configuration or DNS search configuration] ****************************************************************************** Please select one of the following options to change DNS IP or DNS search configuration: ****************************************************************************** (1) Change DNS IP configuration. (2) Change DNS search configuration. (0) Exit ******************************************************************************"
- 更改 DNS IP 配置。
TASK [Ask user if they want to add or remove a DNS server] *************************************************************************************************************************************************** [Ask user if they want to add or remove a DNS server] ****************************************************************************** Please select one of the following options to add or remove an DNS server: ****************************************************************************** (1) Add an DNS server to the configuration. (2) Remove an DNS server from the configuration. (0) Exit ****************************************************************************** :
-
- 更改 DNS IP 配置 ->(1) 将 DNS 服务器添加到配置。
TASK [Ask for DNS server IP if adding] *********************************************************************************************************************************************************************** [Ask for DNS server IP if adding] ****************************************************************************** Enter the IP of the DNS server you want to add: ****************************************************************************** :
-
- 更改 DNS IP 配置
->(2) Remove an DNS server from the configuration
- 更改 DNS IP 配置
TASK [Prompt user to select DNS server to remove] ************************************************************************************************************************************************************ [Prompt user to select DNS server to remove] ******************************************************************************* Enter the letter of the DNS server you want to remove: ******************************************************************************* (0) Exit ******************************************************************************* :
- 更改 DNS 搜索配置。
TASK [Ask user if they want to add or remove a DNS search domain] ******************************************************************************************************************************************** [Ask user if they want to add or remove a DNS search domain] ****************************************************************************** Please select one of the following options to add or remove an DNS search domain: ****************************************************************************** (1) Add a DNS search domain. (2) Remove a DNS search domain. (0) Exit ******************************************************************************
-
- 更改 DNS 搜索配置。-> (1) 添加DNS搜索域。
TASK [Ask for DNS search domain if adding] ******************************************************************************************************************************************************************* [Ask for DNS search domain if adding] ****************************************************************************** Please enter the DNS search domain you want to add: ****************************************************************************** :
-
- 更改 DNS 搜索配置。-> (2) 删除DNS搜索域
TASK [Prompt user to select DNS search domain to remove] ***************************************************************************************************************************************************** [Prompt user to select DNS search domain to remove] ****************************************************************************** Please select the DNS search domain you want to remove: ****************************************************************************** (a) xxxx.xxxx.com (0) Exit ****************************************************************************** :
手动部分
如果脚本失败:
如何将 IP 和 DNSSearch 添加到 DNS 配置:
使用
setrackinfo -a 以配置 DNS 服务器。对客户站点上的每个 DNS 服务器重复命令(或用空格分隔)。
# sudo setrackinfo -a DNSServer <DNS_Server_IP> Example: # sudo setrackinfo -a DNSServer x.x.x.x # sudo setrackinfo -a DNSServer y.y.y.y or # sudo setrackinfo -a DNSServer x.x.x.x y.y.y.y使用
setrackinfo -a 配置 DNS 搜索。对于从最具体到最不具体的每个规格顺序,我们必须运行一次命令。
# sudo setrackinfo -a DNSSearch <DNS_Search_Specification> Example: # sudo setrackinfo -a DNSSearch corp.dell.com # sudo setrackinfo -a DNSSearch dell.com
如何从 DNS 配置中删除 IP:
使用
setrackinfo -d 从列表中删除一个或多个(适用于 DNSServer 或 DNSSearch)
Example: # sudo setrackinfo -d DNSServer x.x.x.x y.y.y.y
其他信息
有关 NTP 配置,请参阅知识库 文章 ECS:如何添加或删除 NTP 服务器。
受影响的产品
ECS Appliance产品
ECS Appliance, Elastic Cloud Storage文章属性
文章编号: 000019614
文章类型: How To
上次修改时间: 24 7月 2025
版本: 8
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。