Re: 1 client is using or hasn't closed the table properly

2012-03-26 Thread Johan De Meersman
- Original Message -
> From: "Brent Clark" 
> 
> Mar 26 14:43:54 xyz-web02 mysqld: 120326 14:43:54 [ERROR]
> /usr/sbin/mysqld: Table './db/comm_opens' is marked as crashed and should be 
> repaired

That needs a 'repair table' command; probably because the snapshot was taken 
while the tables were open.

> Mar 26 14:43:54 xyz-web02 mysqld: 120326 14:43:54 [Warning] Checking table:   
> './db/comm_opens'
> Mar 26 14:43:54 xyz-web02 mysqld: 120326 14:43:54 [ERROR] 1 client is using 
> or hasn't closed the table properly

Pretty harmless; a client indeed didn't close the table properly - you 
snapshotted it while open :-) Again, repair table.

You may want to issue "flush tables with read lock" just before you take the 
snapshot. Must keep that session open during the snapshot (it'll temporarily 
put the database in read-only mode), when the snapshot is complete issue 
"unlock tables" and close the session.

Mind that, while "probably good enough", that doesn't 100% silence the database 
- InnoDB in particular has background processes that just keep going even 
though you flushed and locked all tables. Short of third-party solutions, 
shutdown is the only surefire way to take fully consistent backups of a MySQL 
instance.



-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



1 client is using or hasn't closed the table properly

2012-03-26 Thread Brent Clark

Hi Guys

I got a problem whereby replication (Master - Master) is broken between my two 
nodes.

But whats really interesting is that, when I try and recover, i.e. take a LVM 
snapshot (mylvmbackup), and uncompress / recover  on the slave. On starting 
mysql, I just see a range of

Mar 26 14:43:54 xyz-web02 mysqld: 120326 14:43:54 [ERROR] /usr/sbin/mysqld: 
Table './db/comm_opens' is marked as crashed and should be repaired
Mar 26 14:43:54 xyz-web02 mysqld: 120326 14:43:54 [Warning] Checking table:   
'./db/comm_opens'
Mar 26 14:43:54 xyz-web02 mysqld: 120326 14:43:54 [ERROR] 1 client is using or 
hasn't closed the table properly

Would anyone know what is causing this, and how I can go about fixing it.
Do you think the problem could be on node 1?

Kind Regards
Brent Clark

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql