It seems that i fixed using the --delete option in the rsync command (from
master to slave)
2014-05-10 12:51 GMT+02:00 Regan Jelčić <reganyelcich@stripped>:
> Check this thread:
> > On 10/05/2014, at 10:38 pm, nik600 <nik600@stripped> wrote:
> > Dear all
> > i've got a problem with a sync between master and slave:
> > I've got a master in production with 120 GB of mysql data (~300
> > i'm using innodb_file_per_table = 1 .
> > I want to start a new slave without blocking the master and without
> doing a
> > mysqldump/import on the master.
> > The master is using LVM, so i've created a script that does the
> > - stop mysql on slave
> > - flush tables with read lick on master
> > - read the master file and position
> > - create a snapshot on the LVM on master
> > - remove the lock on master
> > - mount the snapshopt on master
> > - make an rsync from master to slave
> > - unmount the snapshot on master
> > - remove the snapshot
> > - start mysql on slave
> > - reset slave; (on slave)
> > - change master to file and position read at step 3
> > - start the slave
> > All "seems" to work properly but after some minutes of work the
> > Slave_SQL_Running stops and reports some errors:
> > 'Incorrect key file for table './db_foo/zz_php_stats_cache.MYI'; try
> > to repair it' on query. Default database: 'db_foo'. Query: 'INSERT
> > INTO zz_php_stats_cache
> > If i try to fix it manually (doing a lock/dump/import on the master and
> > starting the slave again) the error is given on another table.
> > Both master and slave server are on debian7 and mysql version is
> > Server version: 5.5.35-0+wheezy1 (Debian)
> > Any idea or suggestion about how to figure it out?
> > Thanks to all in advance, bye.
> > --
> > /*************/
> > nik600
> > http://www.kumbe.it