List:Replication« Previous MessageNext Message »
From:nik600 Date:May 10 2014 10:38am
Subject:problem after sync between master and slave
View as plain text  
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.


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