A few months ago, I started some tests with RRDTool and a data source in MySQL. At that time, I just saw that performance was awful but did not investigate further. Now is time to check why, and if any improvements could be made. Continuer la lecture de RRDTool with MySQL
Archives de catégorie : Uncategorized
Migrating RRDTool from 32bits to 64 bits
I had a very old server on a 32 bits platform. A few days ago, I bought a new one with a 64bits platform.
I was using Smokeping on this server, and I wanted to keep my old data. If you copy .rrd files in place, you’ll get an error :
This RRD was created on another architecture
That’s because RRD file structure changed based on the architecture you have. Yes, that’s silly but this is the way it is.
To convert files, you have to dump data to an XML file, sync it on the new server, and reimport it.
This is how to make it with justa few lines of bash :
cd /path/to/rrd/files; for i in $(find . -name '*.rrd'); do rrdtool dump $i > $i.xml ; done rsync -av . my.server.ip:/path/to/new/dir/rrd/
And on the new server :
cd /path/to/new/dir/rrd for i in `find . -name '*.xml'`; do rrdtool restore --force-overwrite $i `echo $i |sed s/.xml//g`; done
XFS – Empty files after a crash
Another major bug in XFS :
After a power failure, server was back but shows some files with size 0 (when I was sure this cannot be possible).
using ‘du -sh’ on this folder shows that total size was > 0 …
The bug was already reported on XFS mailing list here :
If you have many files to recover, procedure is really a pain. That’s why I created a small PHP file that do the trick.
i’m not responsible if you destroy your data 😉 But this script worked well for me.