Jun 162017

Been searching for a tool to streamline ZFS replication between my storage arrays and I think I found it – it’s called syncoid.


# ubuntu
apt install pv lzop mbuffer libconfig-inifiles-perl git -y
# centos
yum install pv lzop mbuffer perl-Config-IniFiles.noarch git -y

cd /usr/src/
git clone https://github.com/jimsalterjrs/sanoid.git
cp sanoid/syncoid /usr/local/sbin/

Now setup SSH keys for passwordless root login and setup cronjob to fire up /usr/local/sbin/replication-syncoid.sh once a day/week/whenever suits you.

0 0 * * 1   /usr/local/sbin/replication-syncoid.sh|logger

Where /usr/local/sbin/replication-syncoid.sh is

FILESYSTEMS="apps home service vmfs"
for i in $FILESYSTEMS; do 
echo "---------------  `date` - syncing $i -------------" >> $LOG 2>&1 
/usr/local/sbin/syncoid -r root@wigry.mielnet.pl:tank/$i cistern/$i >> $LOG 2>&1
echo "---------------  `date` - done $i -------------" >> $LOG 2>&1

It gets the job done nicely and saves me from writing my own bash-voodoo-black-magic-fuckery.

Thanks Jim.

Jun 132017

This is a funny one. Well, if you find this kind of thing funny.

After completing “yum update” on Centos 7.3 box I started getting this error every time I tried to use yum

yum AttributeError: 'list' object has no attribute 'encode'


I poked around and it turned out that it was incompatible version of Spacewalk agent (or rather its components) so in order to get yum working again I had to run this:


rpm -e rhn-check rhn-setup rhnsd yum-rhn-plugin

Now yum should be working again and I’m on the hunt for the newer version of rhn-* packages.

Yeah. It’s not immediately clear from error message so took me a moment to figure this out.