Creating the OCFS2 cluster environment
Preparing to implement the OCFS2 file system and bring it online with a heartbeat requires creating a set of servers (nodes), preparing a set of empty disks with Linux®, and making OCFS2 available on each server.
The ocfs2console creates one configuration file for the first node in the cluster, and propagates it to all the nodes using ssh. The propagation requires that the root user on the nodes can use ssh on each other node without entering a password or a passphrase.
- As the root user, generate a pair of public and private keys
using the
keygencommand:ssh-keygen -t rsa - Accept the default locations and respond to the request for a passphrase with an appropriate password. A pair of authentication keys in the ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub directories will be created.
- Append the contents of the ~/.ssh/id_rsa.pub public key file to the ~/.ssh/authorized_keys file, and then append the same public key file to all the nodes in the OCFS2 cluster. It might be necessary to create the ~/.ssh/authorized_keys file.
- Before proceeding, issue the
sshcommand to use each of these access keys, because the first time that they are used the system asks for an interactive response 'y' from the operator to add the system to the list of known hosts. - As the root user:
- Open a graphical interface such as VNC.
- Open the ocfs2console.
- Create the OCFS2 cluster on the installer by selecting . This builds the /etc/ocfs2/cluster.conf file. Either accept the default name for the cluster, which is OCFS2, or choose a name.
- From the Task menu, select Add, and for
each node type the name of the node, IP address to be used by OCFS2,
and a port number of 7777, which is considered a default port for
cluster communications.
The node name must match the host name, but the extended domain name is not needed. As an example, use myserver instead of myserver.xyz.com. The IP address does not need to be the one associated with that host name. Any valid IP address on that node can be used. OCFS2 does not match the node name (host name) with the specified IP address.
- When all the nodes are added, select Propagate and
click OK.
The creation of the initial cluster of servers that share the OCFS2 file system is now complete.
Cluster members can be added or deleted at a later date in the same manner that the cluster is created. The cluster is now ready to be brought online in preparation for adding the disks for shared storage.