自动发现守护进程 (omdiscd) 提供了一种自动配置 openMosix 集群的方法,从而消除了对 /etc/mosix.map 或类似手动配置的需求。自动发现使用多播数据包来通知其他节点它是一个 openMosix 节点。这样,向您的 mosix 集群添加额外的节点意味着您只需在您的机器上启动 omdiscd,它就会加入集群。
然而,有一些小的要求,就像任何 openMosix 集群一样,您需要正确配置网络。主要是路由。如果没有默认路由,您必须使用 -i 选项为 omdiscd 指定一个接口。否则,omdiscd 将退出并显示如下错误。
Aug 31 20:41:49 localhost omdiscd[1290]: Unable to determine address of default interface. This may happen because there is no default route configured. Without a default route, an interface must be: Network is unreachable Aug 31 20:41:49 localhost omdiscd[1290]: Unable to initialize network. Exiting. |
[root@localhost log]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.0.0.99 0.0.0.0 UG 0 0 0 eth0 |
omdiscd |
Sep 2 10:00:49 oscar0 kernel: openMosix configuration changed: This is openMosix #2780 (of 6 configured) Sep 2 10:00:49 oscar0 kernel: openMosix #2780 is at IP address 192.168.10.220 Sep 2 10:00:49 oscar0 kernel: openMosix #2638 is at IP address 192.168.10.78 Sep 2 10:00:49 oscar0 kernel: openMosix #2646 is at IP address 192.168.10.86 Sep 2 10:00:49 oscar0 kernel: openMosix #2627 is at IP address 192.168.10.67 Sep 2 10:00:49 oscar0 kernel: openMosix #2634 is at IP address 192.168.10.74 |
omdiscd 还有一些其他选项可以使用。您可以将 omdiscd 作为守护进程(默认)运行,也可以在前台运行,其中输出将转到屏幕(标准输出)omdiscd -n。可以使用 -i 选项指定接口。
现在让我们再简要看一下另一个工具,它是 showmap。此工具将向您展示新自动生成的 openMosix 映射。
[root@oscar0 root]# showmap My Node-Id: 0x0adc Base Node-Id Address Count ------------ ---------------- ----- 0x0adc 192.168.10.220 1 0x0a4e 192.168.10.78 1 0x0a56 192.168.10.86 1 0x0a43 192.168.10.67 1 0x0a4a 192.168.10.74 1 |
自动发现还有一些此处未列出的其他功能,例如用于具有多个网络的集群的路由机制。更多详细信息可以在用户区工具源代码树中的 README 和 DESIGN 文件中找到。
较新版本的 openMosix rc 脚本将首先验证是否存在 /etc/openmosix.map 文件或类似文件,然后再尝试使用自动配置。