二、修改各个节点上的/etc/hosts 文件
如下:
[root@node1 ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.0.0.1 gnbd1
10.0.0.2 gnbd2
10.0.0.3 gnbd3
10.0.0.4 gnbd4
10.0.0.11 node1
10.0.0.12 node2
关于这种情况下用softraid的问题,我有个疑问,即在一个节点对/dev/gnbd设备进行了md操作,比如某个/dev/gnbd设备坏了,需要用md来把他从raid中去除,如何通知其他node?我曾经做过softraid 1 over iscsi的实验(iscsi在这里作用和gnbd server一样),md操作需要在所有节点进行,进行操作后会花大量的资源来进行raid的recover操作,这样在/proc/mdstat里看到的才是正确的信息。如果节点数量很多,会很痛苦。