运维联盟俱乐部

 找回密码
 立即注册
查看: 2365|回复: 0

使用diagnostic ISO镜像文件启动Exadata db节点

[复制链接]

该用户从未签到

发表于 2022-3-4 20:01:14 | 显示全部楼层 |阅读模式
1. 拷贝diag.iso到用户桌面
从这套Exadata环境的任何db节点或cell节点上面拷贝diag.iso到你计算机的桌面。在所有的db节点和cell节点都存在/opt/oracle.SupportTools/diagnostics.iso, 这是一个到diag.iso的链接 :
# ls -l /opt/oracle.SupportTools/diagnostics.iso
lrwxrwxrwx 1 root root 27 Aug  2 08:26 /opt/oracle.SupportTools/diagnostics.iso -> /opt/oracle.cellos/diag.iso

[/table]I最新版本的 diag.iso 也可以通过 MOS 获得。 为 diag.iso 的特定 Exadata 软件映像版本识别面向客户的补丁号。 只需在 ISP 高级搜索中搜索“EXADATA diag.iso”并选择所需的版本。 通常,可以使用最新的可用 diag.iso,即使它比客户的 Exadata 软件映像版本更新[table=98%]

2. 设置服务器从diagnostic ISO启动
2.1. 使用root登陆到这台服务器ILOM网页,例如,在浏览器输入<server name>-ilom,然后输入root用户名和密码。

2.2. ILOM主菜单,依次点击 [Remote Control] -> [Redirection] -> [Launch Remote Console].

这样可以登陆到Remote Console, 一个新的 [Oracle(R) Integrated Lights Out Manager Remote Console] 窗口会被打开, 通过这个窗口可以访问服务器的video console (tty1).

2.3. 通过Remote Console主菜单,选择 [Devices] -> [CD-ROM Image...].

这样可以打开对话框选择文件。找到 diag.iso (例如在你本地下载的目录), 选中这个文件并点击 [Open].

这样就可以把 diag.iso 加入虚拟光驱, 这个镜像文件会用来启动服务器。
请注意, 对于X5系统:
  在Exadata X5以及之后的系统,不会出现设备选项。对于这些机器,用户需要按照以下步骤使用ISO文件。
1.  选择KVMS显示下拉菜单
2.  选择Storage. Storage Devices对话框出现
3.  在the Storage Devices对话框, 选择Add. 然后Add Storage Device对话框出现
4.  浏览找到ISO镜像文件, 并选中
5.  选中ISO 镜像文件并点击Connect. 这样ISO文件就被添加到remote console并且可以被用来执行操作系统安装
6.  点击OK离开Storage Devices对话框

参考文档 : https://docs.oracle.com/cd/E4105 ... 4002d3d1472914.html

3. 打开终端(putty)连接到服务器的ILOM
3.1. 在你的本地桌面终端软件(例如putty)使用root连接到<server>-ilom. 或者在你的网络内的任何一台服务器通过ssh连接到<server>-ilom, 例如,如果服务器的名字是exadb01, 那么 :
% ssh root@exadb01-ilom
Password:

3.2. 这样应该可以登录到"->" – ILOM命令行界面,例如:
Oracle(R) Integrated Lights Out Manager
Version 3.1.2.20.c r86871
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.

->

3.3. 设置下一次通过CDROM启动,执行:
-> set /HOST boot_device=cdrom
注意: 这个设置不是永久的,只针对下次reboot,power cycle或者power on/power off生效. 任何后续的reboots, power cycles,或者power off/power on都会使用BIOS的默认设置,也就是DB节点的LSI HBA controller disks和存储节点的internal USB设备. 如果需要再次从diag.iso启动,请重新执行上面的命令。
3.4. 重启服务器从diag.iso,执行:
-> reset -force /SYS
3.5 稍后片刻,启动serial (ttyS0) /SP/console. 执行:
-> start /SP/console
Are you sure you want to start /SP/console (y/n)? y

应该出现下面的信息:
Serial console started. To stop, type ESC (
4. 等待系统从diag.iso启动
系统应该从diag.iso启动. 启动信息在Remote Console和putty/ssh session都可以看到. 在Exadata 11.2.3.3.1及以后的版本, 接收用户I/O的主界面被设成serial ttyS0 /SP/console. 根据本地桌面和ILOM的网速,在启动内核之前加载vmlinuz 和initrd的过程可能需要一些时间。

5. 进入 interactive diagnostics shell
在Remote Console和putty/ssh session window,可以看到服务器经过BIOS POST, 然后是内核启动信息。

在启动的最后,应该出现下面的菜单。注意:当Exadata 11.2.3.3.1及以后的diag.iso被使用时,输出会出现在serial /SP/console, 而不是在挂载iso的Remote Console。这时remote console里面的启动过程可能看起来像是hung住,但其实启动并没有hung住。请同时检查remote console和serial /SP/console:
EXT3-fs: mounted filesystem with ordered data mode.
[date/time]  The current installation has version [Exadata image version]
[date/time]  Choose from the following by typing letter in '()':
[date/time]    (e)nter interactive diagnostics shell.
[date/time]      Use diagnostics shell password to login as root user
[date/time]      (reboot or power cycle to exit the shell),
[date/time]    (r)estore system from NFS backup archive,
Select:

输入 'e' 进入 interactive diagnostics shell.

使用root登陆,这里需要使用Exadata Support Team提供的密码. 注意这里不可以使用root本来的密码。

localhost login: root
Password: *********

登陆之后,输入chroot:
-sh-3.2# chroot /mnt/cell
这个命令可以使你获得服务器文件系统所有的访问权限。
下面的步骤5.1和5.2不是必须的,只有在特定情况下才需要。
5.1. 如果你需要在chroot环境访问/dev下面的文件系统/设备,例如挂载文件系统或者重建 initramfs, 建议在执行chroot命令之前先执行下面的命令:
cd /mnt/cell
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
chroot /mnt/cell

5.2. 如果需要访问/boot, 这个文件系统可以在chroot里面被挂载, 但需要在上面的挂载命令完成之后。
对于DB节点,执行下面的命令挂载/boot文件系统 :
mount /dev/sda1 /boot
对于存储节点,执行下面的命令挂载/boot文件系统 :
mount /dev/md4 /boot

5.3. 这时你可以开始尝试修复那些导致系统无法启动的问题。例如修复内核参数, 可以编辑etc/sysctl.conf file 并保存修改。如果需要禁用SELinux, 可以编辑 /etc/selinux/config
如果问题是发生在DB节点Exadata软件升级的过程中,下面的文档会介绍如何把root device指向升级前备份Exadata 系统image的逻辑卷. Doc ID 1952372.1- How to recover from a failed Linux Exadata DB Server dbnodeupdate or rollback.
甚至问题不是发生在升级中,上面的方法也是可行的,但是需要在系统恢复之后继续升级。

在修复工作完成之后,可以进行正常的服务器启动。
6. 分离diag.iso/停止CD-ROM redirection
在Remote Console主菜单,选择 [Devices] -> [CD-ROM Image...]. 这时可以看到下面的信息: Are you sure you want to stop CD-ROM redirection?. 点击 [Yes].

这样在putty/ssh session可以看到下面的信息:
sh-3.2# usb 1-3.2: USB disconnect, address 4
这个信息是正常的可以忽略。
7. 重启服务器
在putty/ssh session窗口输入 exit, 然后输入 reboot:
sh-3.2# exit
exit
-sh-3.2# reboot

如果使用ILOM重启服务器,请参考上面步骤3.4. 退出/SP/console, 使用ESC ( key sequence.

这时系统应该按照正常的启动顺序启动。如果之前的问题已经被解决,服务器会启动到多用户模式。

8. 从通过diag.iso启动的服务器里面拷贝文件
如果需要从通过diag.iso 启动的服务器里面拷贝文件(例如logs, configuration files), 假设mnt/cell文件系统的内容是可用的,那么这个需求可以轻松实现. 需要激活eth0管理网口,使用scp把文件从其他db节点或者cell节点拷贝过来,或者拷贝到其他db节点或者cell节点。步骤:
8.1. 在进入chroot之后,获取eth0管理网口的配置信息,注意IPADDR和NETMASK的值:
cat /etc/sysconfig/network-scripts/ifcfg-eth0
8.2. 激活 eth0
ifconfig eth0 <IPADDR> netmask <NETMASK> up
8.3. 通过ping同机柜的另一个节点确认网络连通性。注意: Ctrl + C 在diag.iso引导环境可能无效,因此要避免运行任何需要使用Ctrl + C来终止的命令。对于“ping”来说,确保使用"-c 3"选项, 确保ping命令在3次尝试之后会自动终止:
ping -c 3 <IP address of another node in the rack>
8.4. 使用scp命令拷贝文件
注意: diag.iso本身不包含scp. 但是它包含ftp客户端和netcat (nc), 可以用来拷贝文件,以防/mnt/cell文件系统内容丢失或者损坏导致其无法被挂载,导致上面提到的使用chroot的方法无法实现。通常DB节点会在/dev/VGExaDb/LVDbSys2保留一份之前Exadata image的备份,这种情况下可以尝试把其挂载到/mnt/cell并检查其完整性。


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

运维联盟俱乐部 ( 冀ICP备19036648号 )

GMT+8, 2024-5-12 08:41 , Processed in 0.057409 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表