Wednesday, February 18, 2009

GFS vs Multi VM, Pt. 2

Got it. First, read GFS vs Multi VM to get the back story. Several attempts at a GFS cluster failed. It works now... with a few sizeable caveats.

1. Clustering in Fedora 8 is broken, and can not be fixed.
2. Clustering in Fedora 10 will not run on less than 312Mb.
3. Filesystem must be an LVM.

On two, up2date, Fedora 10 VMs with a shared partition, load the three packages, and cluster.conf as previously specified. Do not use Conga or sys-con-cluster! The file must be hand edited. Ensure all host names and IPs are in /etc/hosts.

On the shared partition, pvcreate, vgcreate, lvcreate. On both nodes, vgscan, then execute:
# lvdisplay | grep -i "lv name"
Both nodes should see the LVM.

Start the cluster services:
# service cman start
# service clvmd start
If you connection to the node drops, you've crashed the memory.

From only one node, create the GFS share:
# mkfs.gfs2 -t gfs-test:gfsx -j 2 -p lock_dlm /dev/gfsx/test
For -t, the prefix must match the cluster name in the cluster.conf. The -j specifies the max number of nodes (journals.)

Now mount:
# mount /dev/gfsx/test /gfs
# gfs2_tool list
253:2 gfs-test:gfsx
All commands except mkfs.gfs2 are executed on both nodes.

Needless to say, I glad we're finally done with this one.

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">
  </cman>
  <clusternodes>
    <clusternode name="gfs1.terran.lan" votes="1" nodeid="1">
      <fence>
        <method name="single">
          <device name="human" ipaddr="gfs1.terran.lan"/>
        </method>
      </fence>
    </clusternode>
    <clusternode name="gfs2.terran.lan" votes="1" nodeid="2">
      <fence>
        <method name="single">
          <device name="human" ipaddr="gfs2.terran.lan"/>
        </method>
      </fence>
    </clusternode>
  </clusternodes>
  <fence_devices>
    <fence_device name="human" agent="fence_manual"/>
  </fence_devices>
</cluster>
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.

More virsh Documentation Oversites

Tried to add a disk to a VM, the documentation was lacking. Here's the virsh command:
virsh attach-disk vmname /dev/disk sdb
In this example, it will appear as /dev/sdb to the VM. Unfortunately, partprobe did not work, we had to reboot.

In this case, I've added it to two VMs with the anticipation of granting multiple write access via GFS. Stay tuned.

Tuesday, February 03, 2009

Super Bowl 2009

More correctly, the commercials. The game-- didn't care, didn't even watch. Here are my favorite commercials in no particular order:
Audi: The Chase
Pepsi: I'm Good
Monster.com: Moose Head
Hulu.com: Al(i)e(n)c Baldwin

The good folks at Time Magazine will let you browse others.

Thursday, January 15, 2009

No VMX on RHEL4

And here's another mind blower: If you have a machine with a VMX enabled CPU, you boot it to RHEL5, and cat /proc/cpuinfo, everything works as expected. If you boot that same machine to RHEL4, it masks the VMX flag.

Actually, what happens is that /proc is created at boot time. The cpuinfo file is created and formatted, based up on the kernels interpretation. Sine VMX wans't around in RHEL4 days, it doesn't know how to translate the bits and bytes of the flag.

VMX Disabled in BIOS

I was trying to build out a full-virt VM, and was disappointed to find get an error:
Can't do --hvm on this system: HVM guest is not supported by your CPU or enabled in your BIOS
I knew that wasn't right: vmx showed up in the cpu flags.

Then I learned a new trick. When we cat /proc/cpuinfo, we are looking straight into the CPU. But... That doesn't mean a feature isn't disabled either in the BIOS or on the motherboard. To see what the system's capabilities, we have to go to /sys. In this case we need to:
$ cat /sys/hypervisor/properties/capabilities
xen-3.0-x86_32p
If vmx was working, we'd see a list of hvm capabilites. (Remember: vmx and svm are proprietary, hvm is open.)

On the HP I was working on, virtualization was disabled in the BIOS. That seemed strange, until a co-worker found the setting in the BIOS security settings. Oh, that makes sense-- VM's are a security risk. Either that or it cuts into the number of physical machines HP sells.

Now that it is enabled in BIOS, we get:
$ cat /sys/hypervisor/properties/capabilities
xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p
Molto bueno.

In all fairness, it's not only an HP issue. I found that Compaq is disabling this also.

What's that you say? They are the same company? Nooooo.

Monday, January 12, 2009

Who put that there?

Somebody left a bunch of concrete baricades laying on the sidewalk in DC. Wow, its a good thing they aren't in the street! I can't image why they're here... It's not like anything special is happening.

Top 10 Evil Computers

From Wired, Top 10 Evil Computers. I'm suprised Number 10 wasn't Number 1, but then I guess I'm old. So old, in fact, that my favorite is Number 3. (Cool YouTube link.)

Sunday, January 04, 2009

Effects of Automobiles on the Atmosphere

Meteorologists stated that the US climate model changed after the grounding of commercial aircraft as a result of 9/11. Once the aircraft were back in the air, the model changed back. Now, NASA has evidence as to the degree of impact that automobiles are having an effect on the atmosphere.

For two months prior to the summer olympics, the Chinese government banned cars from Beiging, The effect was a 50% reduction in toxic output. Why only 50%? They still ran buses, trains, and cargo trucks.

64-bit Flash 10 on Fedora 10

I just tried to load the Flash Player for F10 x64, with no luck. Several pages lead me down the wrong paths, including downloading a TAR, and directly importing the SO. I found a post by Naresh Kumar who said to drop the SO in:
~/mozilla/plugins
rather than
/usr/lib/mozilla/plugins
Now it works.