升级 Cumulus Linux 版本
按照以下步骤升级您的 Cumulus Linux 版本(如有需要)。
请确保您拥有以下物品:
-
具备中级Linux知识。
-
熟悉基本的文本编辑、UNIX 文件权限和进程监控。预装了多种文本编辑器,包括
vi`和 `nano。 -
能够访问 Linux 或 UNIX shell。如果您运行的是 Windows 系统,请使用 Linux 环境作为与 Cumulus Linux 交互的命令行工具。
-
对于NVIDIA SN2100 交换机控制台访问,串行控制台交换机的波特率要求设置为 115200,具体如下:
-
115200 波特
-
8 位数据
-
1 停止位
-
奇偶性:无
-
流量控制:无
-
请注意以下事项:
|
|
每次 Cumulus Linux 升级时,整个文件系统结构都会被擦除并重建。您现有的配置将被清除。在更新 Cumulus Linux 之前,必须保存并记录交换机配置。 |
|
|
Cumulus 用户帐户的默认密码是 cumulus。首次登录 Cumulus Linux 时,必须更改此默认密码。安装新镜像之前,必须先更新所有自动化脚本。 Cumulus Linux 提供命令行选项,可在安装过程中自动更改默认密码。 |
看 "安装新的 Cumulus Linux 镜像"欲了解更多信息。
-
将集群交换机连接到管理网络。
-
使用 ping 命令验证与托管 Cumulus Linux 和 RCF 的服务器的连接性。
-
显示每个节点上连接到集群交换机的集群端口:
network device-discovery show -
检查每个集群端口的管理和运行状态。
-
确认集群所有端口均已启动且状态正常:
network port show -role cluster -
确认所有集群接口(LIF)都位于主端口上:
network interface show -role cluster -
确认集群显示两个集群交换机的信息:
system cluster-switch show -is-monitoring-enabled-operational true
-
-
禁用集群 LIF 的自动回滚功能。集群 LIF 会故障转移到伙伴集群交换机,并在您对目标交换机执行升级过程时保留在该交换机上:
network interface modify -vserver Cluster -lif * -auto-revert false -
检查当前 Cumulus Linux 版本和已连接的端口:
cumulus@cumulus:mgmt:~$ net show system Hostname......... cumulus Build............ Cumulus Linux 4.4.3 Uptime........... 0:08:20.860000 Model............ Mlnx X86 CPU.............. x86_64 Intel Atom C2558 2.40GHz Memory........... 8GB Disk............. 14.7GB ASIC............. Mellanox Spectrum MT52132 Ports............ 16 x 100G-QSFP28 Part Number...... MSN2100-CB2FC Serial Number.... MT2105T05177 Platform Name.... x86_64-mlnx_x86-r0 Product Name..... MSN2100 ONIE Version..... 2019.11-5.2.0020-115200 Base MAC Address. 04:3F:72:43:92:80 Manufacturer..... Mellanox cumulus@cumulus:mgmt:~$ net show interface State Name Spd MTU Mode LLDP Summary ----- ------ ---- ----- ---------- ---------------------- -------------------- . . UP swp1 100G 9216 Trunk/L2 node1 (e5b) Master: bridge(UP) UP swp2 100G 9216 Trunk/L2 node2 (e5b) Master: bridge(UP) UP swp3 100G 9216 Trunk/L2 SHFFG1826000112 (e0b) Master: bridge(UP) UP swp4 100G 9216 Trunk/L2 SHFFG1826000112 (e0b) Master: bridge(UP) UP swp5 100G 9216 Trunk/L2 SHFFG1826000102 (e0b) Master: bridge(UP) UP swp6 100G 9216 Trunk/L2 SHFFG1826000102 (e0b) Master: bridge(UP)) . .
-
下载 Cumulux Linux 5.4.0 镜像:
cumulus@cumulus:mgmt:~$ sudo onie-install -a -i http://<ip-to-webserver>/path/to/cumulus-linux-5.4.0-mlx-amd64.bin [sudo] password for cumulus: Fetching installer: http://<ip-to-webserver>/path/to/cumulus-linux-5.4.0-mlx-amd64.bin Downloading URL: http://<ip-to-webserver>/path/to/cumulus-linux-5.4.0-mlx-amd64.bin # 100.0% Success: HTTP download complete. EFI variables are not supported on this system Warning: SecureBoot is not available. Image is signed. . . . Staging installer image...done. WARNING: WARNING: Activating staged installer requested. WARNING: This action will wipe out all system data. WARNING: Make sure to back up your data. WARNING: Are you sure (y/N)? y Activating staged installer...done. Reboot required to take effect.
-
重启交换机:
cumulus@cumulus:mgmt:~$ sudo reboot
-
更改密码:
cumulus login: cumulus Password: You are required to change your password immediately (administrator enforced) Changing password for cumulus. Current password: cumulus New password: <new_password> Retype new password: <new_password> Linux cumulus 5.10.0-cl-1-amd64 #1 SMP Debian 5.10.162-1+cl5.4.0u1 (2023-01-20) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) ZTP in progress. To disable, do 'ztp -d'
-
检查 Cumulus Linux 版本:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied ---------- -------------- ---------- hostname cumulus cumulus build Cumulus Linux 5.4.0 uptime 14:07:08 timezone Etc/UTC -
更改主机名:
cumulus@cumulus:mgmt:~$ nv set system hostname sw1 cumulus@cumulus:mgmt:~$ nv config apply Warning: The following files have been changed since the last save, and they WILL be overwritten. - /etc/nsswitch.conf - /etc/synced/synced.conf . .
-
注销并重新登录交换机,即可在提示符处看到更新后的交换机名称:
cumulus@cumulus:mgmt:~$ exit logout Debian GNU/Linux 10 cumulus ttyS0 cumulus login: cumulus Password: Last login: Tue Dec 15 21:43:13 UTC 2020 on ttyS0 Linux cumulus 5.10.0-cl-1-amd64 #1 SMP Debian 5.10.162-1+cl5.4.0u1 (2023-01-20) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) ZTP in progress. To disable, do 'ztp -d' cumulus@sw1:mgmt:~$
-
设置IP地址:
cumulus@sw1:mgmt:~$ nv set interface eth0 ip address 10.231.80.206/22 cumulus@sw1:mgmt:~$ nv set interface eth0 ip gateway 10.231.80.1 cumulus@sw1:mgmt:~$ nv config apply applied [rev_id: 2] cumulus@sw1:mgmt:~$ ip route show vrf mgmt default via 10.231.80.1 dev eth0 proto kernel unreachable default metric 4278198272 10.231.80.0/22 dev eth0 proto kernel scope link src 10.231.80.206 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
-
创建一个新用户并将该用户添加到 `sudo`团体。该用户仅在控制台/SSH会话重启后生效。
sudo adduser --ingroup netedit admincumulus@sw1:mgmt:~$ sudo adduser --ingroup netedit admin [sudo] password for cumulus: Adding user 'admin' ... Adding new user 'admin' (1001) with group `netedit' ... Creating home directory '/home/admin' ... Copying files from '/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for admin Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y cumulus@sw1:mgmt:~$ sudo adduser admin sudo [sudo] password for cumulus: Adding user `admin' to group `sudo' ... Adding user admin to group sudo Done. cumulus@sw1:mgmt:~$ exit logout Connection to 10.233.204.71 closed. [admin@cycrh6svl01 ~]$ ssh admin@10.233.204.71 admin@10.233.204.71's password: Linux sw1 4.19.0-cl-1-amd64 #1 SMP Cumulus 4.19.206-1+cl4.4.1u1 (2021-09-09) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) For support and online technical documentation, visit http://www.cumulusnetworks.com/support The registered trademark Linux (R) is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis. admin@sw1:mgmt:~$
-
添加其他用户组以供管理员用户访问 `nv`命令:
cumulus@sw1:mgmt:~$ sudo adduser admin nvshow [sudo] password for cumulus: Adding user `admin' to group `nvshow' ... Adding user admin to group nvshow Done.看 "NVIDIA用户帐户"了解更多信息。
-
将集群交换机连接到管理网络。
-
使用 ping 命令验证与托管 Cumulus Linux 和 RCF 的服务器的连接性。
-
显示每个节点上连接到集群交换机的集群端口:
network device-discovery show -
检查每个集群端口的管理和运行状态。
-
确认集群所有端口均已启动且状态正常:
network port show -role cluster -
确认所有集群接口(LIF)都位于主端口上:
network interface show -role cluster -
确认集群显示两个集群交换机的信息:
system cluster-switch show -is-monitoring-enabled-operational true
-
-
禁用集群 LIF 的自动回滚功能。集群 LIF 会故障转移到伙伴集群交换机,并在您对目标交换机执行升级过程时保留在该交换机上:
network interface modify -vserver Cluster -lif * -auto-revert false -
检查当前 Cumulus Linux 版本和已连接的端口:
cumulus@sw1:mgmt:~$ nv show system operational applied ------------------- -------------------- ----------------- hostname cumulus cumulus build Cumulus Linux 5.3.0 uptime 6 days, 8:37:36 timezone Etc/UTC cumulus@sw1:mgmt:~$ nv show interface Interface MTU Speed State Remote Host Remote Port- Type Summary ------------- ----- ----- ----- ------------------- ------------ --------- ------------- + cluster_isl 9216 200G up bond + eth0 1500 100M up mgmt-sw1 Eth105/1/14 eth IP Address: 10.231.80 206/22 eth0 IP Address: fd20:8b1e:f6ff:fe31:4a0e/64 + lo 65536 up loopback IP Address: 127.0.0.1/8 lo IP Address: ::1/128 + swp1s0 9216 10G up cluster01 e0b swp . . . + swp15 9216 100G up sw2 swp15 swp + swp16 9216 100G up sw2 swp16 swp -
下载 Cumulux Linux 5.4.0 镜像:
cumulus@sw1:mgmt:~$ sudo onie-install -a -i http://<ip-to-webserver>/path/to/cumulus-linux-5.4.0-mlx-amd64.bin [sudo] password for cumulus: Fetching installer: http://<ip-to-webserver>/path/to/cumulus-linux-5.4.0-mlx-amd64.bin Downloading URL: http://<ip-to-webserver>/path/to/cumulus-linux-5.4.0-mlx-amd64.bin # 100.0% Success: HTTP download complete. EFI variables are not supported on this system Warning: SecureBoot is not available. Image is signed. . . . Staging installer image...done. WARNING: WARNING: Activating staged installer requested. WARNING: This action will wipe out all system data. WARNING: Make sure to back up your data. WARNING: Are you sure (y/N)? y Activating staged installer...done. Reboot required to take effect.
-
重启交换机:
cumulus@sw1:mgmt:~$ sudo reboot
-
更改密码:
cumulus login: cumulus Password: You are required to change your password immediately (administrator enforced) Changing password for cumulus. Current password: cumulus New password: <new_password> Retype new password: <new_password> Linux cumulus 5.10.0-cl-1-amd64 #1 SMP Debian 5.10.162-1+cl5.4.0u1 (2023-01-20) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) ZTP in progress. To disable, do 'ztp -d'
-
检查 Cumulus Linux 版本:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied -------------- ---------------- hostname cumulus cumulus build Cumulus Linux 5.4.0 uptime 14:07:08 timezone Etc/UTC
-
更改主机名:
cumulus@cumulus:mgmt:~$ nv set system hostname sw1 cumulus@cumulus:mgmt:~$ nv config apply Warning: The following files have been changed since the last save, and they WILL be overwritten. - /etc/nsswitch.conf - /etc/synced/synced.conf . .
-
注销并重新登录交换机,即可在提示符处看到更新后的交换机名称:
cumulus@cumulus:mgmt:~$ exit logout Debian GNU/Linux 10 cumulus ttyS0 cumulus login: cumulus Password: Last login: Tue Dec 15 21:43:13 UTC 2020 on ttyS0 Linux cumulus 5.10.0-cl-1-amd64 #1 SMP Debian 5.10.162-1+cl5.4.0u1 (2023-01-20) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) ZTP in progress. To disable, do 'ztp -d' cumulus@sw1:mgmt:~$
-
设置IP地址:
cumulus@sw1:mgmt:~$ nv unset interface eth0 ip address dhcp cumulus@sw1:mgmt:~$ nv set interface eth0 ip address 10.231.80.206/22 cumulus@sw1:mgmt:~$ nv set interface eth0 ip gateway 10.231.80.1 cumulus@sw1:mgmt:~$ nv config apply applied [rev_id: 2] cumulus@sw1:mgmt:~$ ip route show vrf mgmt default via 10.231.80.1 dev eth0 proto kernel unreachable default metric 4278198272 10.231.80.0/22 dev eth0 proto kernel scope link src 10.231.80.206 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
-
创建一个新用户并将该用户添加到 `sudo`团体。该用户仅在控制台/SSH会话重启后生效。
sudo adduser --ingroup netedit admincumulus@sw1:mgmt:~$ sudo adduser --ingroup netedit admin [sudo] password for cumulus: Adding user 'admin' ... Adding new user 'admin' (1001) with group `netedit' ... Creating home directory '/home/admin' ... Copying files from '/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for admin Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y cumulus@sw1:mgmt:~$ sudo adduser admin sudo [sudo] password for cumulus: Adding user `admin' to group `sudo' ... Adding user admin to group sudo Done. cumulus@sw1:mgmt:~$ exit logout Connection to 10.233.204.71 closed. [admin@cycrh6svl01 ~]$ ssh admin@10.233.204.71 admin@10.233.204.71's password: Linux sw1 4.19.0-cl-1-amd64 #1 SMP Cumulus 4.19.206-1+cl4.4.1u1 (2021-09-09) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) For support and online technical documentation, visit http://www.cumulusnetworks.com/support The registered trademark Linux (R) is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis. admin@sw1:mgmt:~$
-
添加其他用户组以供管理员用户访问 `nv`命令:
cumulus@sw1:mgmt:~$ sudo adduser admin nvshow [sudo] password for cumulus: Adding user `admin' to group `nvshow' ... Adding user admin to group nvshow Done.看 "NVIDIA用户帐户"了解更多信息。
-
将集群交换机连接到管理网络。
-
使用 ping 命令验证与托管 Cumulus Linux 和 RCF 的服务器的连接性。
-
显示每个节点上连接到集群交换机的集群端口:
network device-discovery show -
检查每个集群端口的管理和运行状态。
-
确认集群所有端口均已启动且状态正常:
network port show -role cluster -
确认所有集群接口(LIF)都位于主端口上:
network interface show -role cluster -
确认集群显示两个集群交换机的信息:
system cluster-switch show -is-monitoring-enabled-operational true
-
-
禁用集群 LIF 的自动回滚功能。集群 LIF 会故障转移到伙伴集群交换机,并在您对目标交换机执行升级过程时保留在该交换机上:
network interface modify -vserver Cluster -lif * -auto-revert false -
检查当前 Cumulus Linux 版本和已连接的端口:
cumulus@sw1:mgmt:~$ nv show system operational applied ------------------- -------------------- ----------------- hostname cumulus cumulus build Cumulus Linux 5.4.0 uptime 6 days, 8:37:36 timezone Etc/UTC cumulus@sw1:mgmt:~$ nv show interface Interface MTU Speed State Remote Host Remote Port- Type Summary ------------- ----- ----- ----- ------------------- ------------ --------- ------------- + cluster_isl 9216 200G up bond + eth0 1500 100M up mgmt-sw1 Eth105/1/14 eth IP Address: 10.231.80 206/22 eth0 IP Address: fd20:8b1e:f6ff:fe31:4a0e/64 + lo 65536 up loopback IP Address: 127.0.0.1/8 lo IP Address: ::1/128 + swp1s0 9216 10G up cluster01 e0b swp . . . + swp15 9216 100G up sw2 swp15 swp + swp16 9216 100G up sw2 swp16 swp -
下载 Cumulux Linux 5.11.0 镜像:
cumulus@sw1:mgmt:~$ sudo onie-install -a -i http://<ip-to-webserver>/path/to/cumulus-linux-5.11.0-mlx-amd64.bin [sudo] password for cumulus: Fetching installer: http://<ip-to-webserver>/path/to/cumulus-linux-5.11.0-mlx-amd64.bin Downloading URL: http://<ip-to-webserver>/path/to/cumulus-linux-5.11.0-mlx-amd64.bin # 100.0% Success: HTTP download complete. EFI variables are not supported on this system Warning: SecureBoot is not available. Image is signed. . . . Staging installer image...done. WARNING: WARNING: Activating staged installer requested. WARNING: This action will wipe out all system data. WARNING: Make sure to back up your data. WARNING: Are you sure (y/N)? y Activating staged installer...done. Reboot required to take effect.
-
重启交换机:
cumulus@sw1:mgmt:~$ sudo reboot
-
更改密码:
cumulus login: cumulus Password: You are required to change your password immediately (administrator enforced) Changing password for cumulus. Current password: cumulus New password: <new_password> Retype new password: <new_password> Linux cumulus 5.11.0-cl-1-amd64 #1 SMP Debian 5.10.162-1+cl5.4.0u1 (2023-01-20) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) ZTP in progress. To disable, do 'ztp -d'
-
检查 Cumulus Linux 版本:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied -------------- ---------------- hostname cumulus cumulus build Cumulus Linux 5.11.0 uptime 14:07:08 timezone Etc/UTC
-
更改主机名:
cumulus@cumulus:mgmt:~$ nv set system hostname sw1 cumulus@cumulus:mgmt:~$ nv config apply Warning: The following files have been changed since the last save, and they WILL be overwritten. - /etc/nsswitch.conf - /etc/synced/synced.conf . .
-
注销并重新登录交换机,即可在提示符处看到更新后的交换机名称:
cumulus@cumulus:mgmt:~$ exit logout Debian GNU/Linux 10 cumulus ttyS0 cumulus login: cumulus Password: Last login: Tue Dec 15 21:43:13 UTC 2020 on ttyS0 Linux cumulus 5.11.0-cl-1-amd64 #1 SMP Debian 5.10.162-1+cl5.4.0u1 (2023-01-20) x86_64 Welcome to NVIDIA Cumulus (R) Linux (R) ZTP in progress. To disable, do 'ztp -d' cumulus@sw1:mgmt:~$
-
设置IP地址:
cumulus@sw1:mgmt:~$ nv unset interface eth0 ip address dhcp cumulus@sw1:mgmt:~$ nv set interface eth0 ip address 10.231.80.206/22 cumulus@sw1:mgmt:~$ nv set interface eth0 ip gateway 10.231.80.1 cumulus@sw1:mgmt:~$ nv config apply applied [rev_id: 2] cumulus@sw1:mgmt:~$ ip route show vrf mgmt default via 10.231.80.1 dev eth0 proto kernel unreachable default metric 4278198272 10.231.80.0/22 dev eth0 proto kernel scope link src 10.231.80.206 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
升级 Cumulus Linux 版本后,您可以……"安装或升级 RCF 脚本" 。