storage

KVM live migration with sanlock using virsh

Sanlock helps you avoid screwing things up by starting the same virtual machine on multiple hosts, which will quickly mangle the guest file systems. But you’ll quickly find live migration no longer works from the virt-manager GUI.

I was in shock when I first saw this migration error from virt-manager!

Internal error cannot use migrate v2 protocol with lock manager sanlock? But alas, all is not lost.

Migration from the virsh command shell works just fine for me. And it’s quicker and more efficient than doing it pointy-clicky style from a gui anyway. If i’m migrating a guest from one host to another, it’s usually because I need to shut down the host hardware. I’m not migrating just one guest, i’m migrating one at a time.

With the shell method, I repeat the migration command in a loop and move them all, one after another automatically. Monday migrate, tuesday migrate, everybody. It’ll get in your bones!

root@host1~# for x in 1 2 3 4 5 6 7 8; do
virsh migrate –live guest$x qemu+ssh://host2/system
done

When I first set up sanlock for qemu locking, I saw errors during migration of several hosts that were already up and running with local locking before sanlock locking was implemented.

error: … Read More »

Mount a partition from a raw file dd backup of a whole disk

I backed up a disk on the fly to another host using dd output piped to netcat on the host I was backing up, and netcat output piped back to dd input on the receiving end. This worked great, except it turns out I don’t need the whole disk.

Create OCFS2 Clustered File Systems on shared storage

Use the ocfs2console gui to create the cluster.conf for you. Your first problem may be in creating the config by hand. Even if everything looks right including the permissions to the files and directories, the ocfs2 daemons may still not see the configuration at all.

Dropbox in Linux behind a firewall or proxy

But instead, you find it needs an additional piece, the dropboxd daemon that isn’t included in the package. You see this popup and you click ok, but for whatever reason it just hangs there. Nothing is happening. Now what…?

Test rsync with dry runs before executing to avoid losing data

With the power of rsync, it’s quite easy to accidentally erase, overwrite, or otherwise destroy your data with one slip of the keys. Even if you supply the right switches, you might leave off a slash or put one where it doesn’t belong.

10 tips for boosting network performance

10 tips, each summarized in a sentence or two. Speed up your WAN, Build a lab, know your apps, virtualization pitfalls, speed up backups, and more.

Clustered Samba on GFS2 in Fedora 12

With Samba using a clustered database, you can now export the same shared storage (this is only on the gfs2 file system – I haven’t seen any testing on ocfs2) on multiple nodes in an active/active samba cluster. The storage on clients that mount this export will be available when active failover occurs from one server node to another.