This RRD was created on other architecture

I use Munin for some graphing of system and application stats. Like most graphing open source projects its based on the widely used RRDTool.

I recently was moving my munin instance from a xen instance on 64bit Ubuntu install, to a bare metal 32bit install. Moving munin consists of the moving the munin.conf file and moving the /var/lib/munin directory. After moving it I noticed graphs weren’t updating as expected and came across this is the munin-update.log:

This RRD was created on other architecture

Not surprising that RRD files are platform specific. Came across this blog post that has a couple of shell scripts to handle this. Since the blog post is in German I will summarize what they do:

1. dump.sh:

This does a find in your /var/lib/munin directory looking for all “.rrd” files. It takes each file and uses the rrdtool “dump” option to dump the information into a corresponding xml file.

2. restore.sh

This takes the xml data and creates a new rrd file from the xml file. Before creating the new rrd file from the xml file it copies the original rrd file to backup file with an extension of “.bak”.

When I did this I copied the munin directory to a 64bit host to run dump.sh since the rrd files were originally created on 64bit host. I then copied the directory back over to the 32bit machine to run the restore.

You can find the scripts on Frank Helmschrott’s blog posting. I will include a slightly modified version here:

dump.sh:

#!/bin/bash
MUNIN_DIR="/var/lib/munin"

for f in `find ${MUNIN_DIR} -name '*.rrd' -print` ;

do
f_xml=`dirname ${f}`/`basename ${f} .rrd`.xml
rrdtool dump "$f" > "${f_xml}"
chown root:0 "${f_xml}"
done

restore.sh:

#!/bin/bash
MUNIN_DIR="/home/kenc/munin"

for f in `find ${MUNIN_DIR} -name '*.xml' -print` ;
do
f_rrd=`dirname ${f}`/`basename ${f} .xml`.rrd
mv -f "${f_rrd}" "${f_rrd}.bak"
chown root:0 "${f_rrd}.bak"
rrdtool restore "$f" "${f_rrd}"
chown munin:munin "${f_rrd}"
done
This entry was posted in /geek, /sysadmin, /unix, /work and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Llarian
    Posted April 27, 2009 at 2:25 pm | Permalink

    Tobi is actually working on an architecture independant RRD storage format, although I’m not sure what version he’s targetting for that.

    I’ll be damn happy though, as I regularly have both 32-bit and 64-bit servers in production and moving the amount of RRDs I have is a royal PITA.

  2. Posted April 27, 2009 at 2:32 pm | Permalink

    Yeah it was a real PITA for me. I moved the munin instance and did nor realize for a little while that it was not updating graphs. During that period I had created some new plugins which created new rrd files. So I ended up with a mish mash of 32bit and 64bit rrd files I had to sort through.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled