欢迎来到之路教程(on itroad-com)
禁用 os-prober
os-prober 在生成新的 GRUB 配置文件时由命令 grub2-mkconfig 调用。
使用操作系统探测在繁忙的 Oracle ASM LUN 上运行 grub 更新会导致 ASM 磁盘超时。
我们会在 oracle 跟踪文件中看到以下错误:
ORA-15080: synchronous I/O operation failed to write block 567864873 of disk 6 in >disk group REDO ORA-27061: waiting for async I/Os failed Linux-x86_64 Error: 1: Operation not permitted
要禁用 os-prober:
- 文件 /etc/default/grub 中的变量 GRUB_DISABLE_OS_PROBER 应设置为 true 。
例如:
# vi /etc/default/grub GRUB_DISABLE_OS_PROBER=true
GRUB_DISABLE_OS_PROBER=true 选项说明
'GRUB_DISABLE_OS_PROBER' Normally, 'grub-mkconfig' will try to use the external 'os-prober' program, if installed, to discover other operating systems installed on the same system and generate appropriate menu entries for them. Set this option to 'true' to disable this. 通常,'grub-mkconfig' 会尝试使用外部的 'os-prober' 程序(如果已安装)来发现安装在同一系统上的其他操作系统 并为它们生成适当的菜单条目。 将此选项设置为“true”以禁用此功能。
在制作 grub.cfg 时,命令 grub2-mkconfig 会扫描所有提供给系统的磁盘。
如果系统有大量磁盘,这可能需要很长时间,并且系统会出现挂起。
所以建议在oracle 数据库系统繁忙,ASM 磁盘较多的情况下禁用它。
- 修改/etc/default/grub后,需要重新生成GRUB配置。
在基于 BIOS 的系统上:
# grub2-mkconfig -o /boot/grub2/grub.cfg
在基于 UEFI 的系统上:
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
什么是os-prober
os-prober 包检测机器上可用的所有操作系统,并以通用的机器可读格式返回结果。
有时 os-prober 在探测某些特殊磁盘(例如:Oracle ASM 磁盘)时可能会出现问题。
这篇文章描述了如何禁用 os-prober。
日期:2020-09-17 00:12:30 来源:oir作者:oir