Elasticsearch – the river with jdbc (for mysql).

First of all you cannot block automapping, so: # elasticsearch.yml index.mapper.dynamic: true Pre-mapping of your river doesn’t resolve the problem. # part of the river configuration: “type_mapping”: { “mytype” : { “properties” : { “location” : { “type” : “geo_point” } } } Tip: If your node does not work after installation of the plugin […]

Read more...

Yum. Find a file in repository…

How to find the given program w/o knowledge about the package it belongs to? I need to install the program iostat but i have no idea which package to choose. [root@localhost ~]# yum provides iostat Loaded plugins: langpacks, refresh-packagekit sysstat-10.1.6-1.fc20.x86_64 : Collection of performance monitoring tools for Linux Repo : fedora Matched from: Filename : […]

Read more...

bcache

Necessity_is_the_mother_of_invention I needed some cheap solution for my slow HDDs in one of MySQL node. The box was limited to 4 HDD slots and the actual configuration w/o RAID 1 stopped working 🙂 At the same time I read about Fedora 20 and found some pretty io mechanism called bcache. It works in a similar […]

Read more...

Proxmox customization

How to change default settings and make software raid (mirror and stripe) with GPT. While booting installation: linux ext4 hdsize=10 maxroot=5 swapsize=1 maxvz=1 http://www.jamescoyle.net/how-to/261-proxmox-advanced-install-settings In case your partitions were used with raid you should wipe them (dry :]): wipefs -a /dev/sdb1 # or mdadm –zero-superblock /dev/sdb[1-4] apt-get -y update apt-get -y dist-upgrade START_AT=`parted /dev/sda p […]

Read more...

Sphinx replication II

Four years ago I presented the first version of the replication for Sphinx Search. Since that time I have introduced many modifications of the structure: partitioning of delta indices, introducing the distrubuted index. Additionaly, I have changed the system environment from CentOs into LXC (Debian). The storage has been divided into shardes conform to the […]

Read more...

Performance test

First of all I use my own script (called quick-confession) which get me info about processors, ram, discs, etc. You can get it here. It contains the instruction how to compile sysbench. I am also used to test the configuration with iozone and filebench. I am using xfs for database storage and tune it as […]

Read more...

Binlog corrupted

ERROR: Error in Log_event::read_log_event(): ‘Event too big’, data_len: 1635021669, event_type: 116 ERROR: Could not read entry at offset 56474241: Error in log format or read error. The replication broke down cause the binlog file got corrupted. I have found two methods to try to recover some information: 1. MySQL command “show binlog events” – reading […]

Read more...

Binlog rotator

Remote Binlog Back-up. Quite similar feature is available since 5.6 #!/bin/bash # # ||||||||||| # ———– # [] [] # | # //|\\ # # The Binlog Patrol # @auth: pb@press-service.com.pl # @background: # Why do not use rotate? # 1. Rotate does not turn off the instance. # 2. Rotate does not know: # […]

Read more...

Failed to remove cgroup when lxc-start failed

Solution: cat /cgroup/sph-slave/tasks 24077 kill -9 24077

Read more...

iScsi – change the device on the target (hot plugging)

The aim of the operation was to enlarge the space in the database volume. My colleague replaced the disks in the storage (hot plug). I was forced to perform the entire operation remotely. The LSI controller saw the new disks, however the OS and the Iscsi software thought that the device was still 360GB in […]

Read more...