Wednesday, February 11, 2009

GFS -vs- Multi VM

Trying to connect two VMs to the same file system using GFS. The docuementation is okay up to the point where we need to mount GFS filesystem. That's when we get:
/sbin/mount.gfs2: waiting for gfs_controld to start
/sbin/mount.gfs2: gfs_controld not running
/sbin/mount.gfs2: error mounting lockproto lock_dlm
Appearently we have to cluster. Gee, it would have been nice if they had included those instructions in the "Prerequisites" section. So... What does it take?

I tried the system-config-cluster and didn't get the results I wanted. It wanted one node to be a primary, the other a secondary. I tried hacking cluster.conf, but too many variables (literal and metaphorical). So I built two VMs, attached them to the same LVM, and tried to get GFS to work.

Load packages:
# yum install cman gfs2-utils lvm2-cluster
These seem to be the minimum. There is a bug with Fedora 8, where it won't load unless you do two yum updates first. If you have an x86_64 system, make sure it only loads the 64 bit version. Easy enough.

The heart of the cluster is the non-existent /etc/custer/cluster.conf, which can be generated by several automated tools, all of which are broken. In other words, you absolutely must enter it by hand. Here's what we need:
<?xml version="1.0"?>
<cluster name="clust" config_version="1">
  <cman two_node="1" expected_votes="1">
    <clusternode name="gfs1.terran.lan" votes="1" nodeid="1">
        <method name="single">
          <device name="human" ipaddr="gfs1.terran.lan"/>
    <clusternode name="gfs2.terran.lan" votes="1" nodeid="2">
        <method name="single">
          <device name="human" ipaddr="gfs2.terran.lan"/>
    <fence_device name="human" agent="fence_manual"/>
Again, this is a bare minimum config.

Now try it:
# service cman start
Glory! It started.

Time to mount:
# mount /dev/sdb1 /gfs
/sbin/mount.gfs2: can't connect to gfs_controld: Connection rufused
Arrrrrgh! The error message:
No entry for lock_dlm_plock found
Is dlm missing from kernel?
No, it is not missing:
# lsmod | grep dlm
lock_dlm     25449 0
gfs2           489593 1 lock_dlm
dlm             123049 4 lock_dlm
configfs       32617 2 dlm
Okay, back to the drawing board.

No comments:

Post a Comment