List:Replication« Previous Message
From:nik600 Date:May 15 2014 7:12am
Subject:Re: problem after sync between master and slave
View as plain text  
It seems that i fixed using the --delete option in the rsync command (from
master to slave)

Bye!


2014-05-10 12:51 GMT+02:00 Regan Jelčić <reganyelcich@stripped>:

> Check this thread:
>
> http://stackoverflow.com/questions/2011050/mysql-126-incorrect-key-file-for-table
>
>
>
>
> > 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
> databases),
> > 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
> following:
> >
> > - 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
>



-- 
/*************/
nik600
http://www.kumbe.it

Thread
problem after sync between master and slavenik60010 May 2014
Re: problem after sync between master and slavenik60015 May 2014