Bind9: balancing by client ip (even/odd)

For some reason i need balancing client’s 50/50 for 2 datacenter’s
But, if client send GET request to datacenter1 (DC1) all following request need redirect to the same DC1. Only if DC1 is down – send to DC2
Simplest way – is share client’s by their ip (odd/even)
So we need two Bind9 services on one server.
First Bind9 will be answered that www.example.org is in DC1, second – in DC2
For example first named.conf:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
};
....

Zone:

Читати далі

Syncthing

Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it’s transmitted over the Internet. Нада потестити…..

Подсветить диск на контроллере LSI Logic

Перед заменой сбойного диска на сервере желательно сначала его подсветить, чтобі по случайности не вінять “живой” диск
Делается єто так:

/MegaRAID/MegaCli/MegaCli64 -PdLocate -start -PhysDrv [32:1] -a0

где:
32 – Enclosure Device ID: 32
1 – Slot Number: 1
Выключить подсветку:

/MegaRAID/MegaCli/MegaCli64 -PdLocate -stop -PhysDrv [32:1] -a0

Читати далі

Mysql: purge Master logs

Если у вас настроена репликация Mysql то иногда бинарные логи розрастаются до неймоверных обьемов. В таком случае эти логи можно скормить мастеру Mysql заодно освободив место на файловой системе
Делается это так:

master$ mysql -u root -pMypass -e "PURGE BINARY LOGS TO 'mysql-bin.0066';"

Или так:

Читати далі