PDA

View Full Version : Error locking index file



YinYang
July 31st, 2008, 08:03 AM
Hi,

I'm trying to setup remote backup from several "small" mysql DB but it always fails ... any ideias why ?


Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: {
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: quiet=0
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: verbose=1
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: retention-policy=4W
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: backup-level=0
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: all-databases=1
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: destination=/var/local/amanda/zamanda
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: mailto=root@localhost
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: port=3306
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: host=xxxx.xxxx.xxxx
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: backup-mode=logical
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: password=******
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: comment=Application servers backup
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: user=zuser
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: }
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: datadir is /var/lib/mysql/
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: mysql_version is 5.0.45-log
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: InnoDB data file are /var/lib/mysql/ibdata1
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: InnoDB log dir is /var/lib/mysql/.
Thu Jul 31 16:21:26 2008: AppBackups:backup:INFO: backup set being used is AppBackups
Thu Jul 31 16:21:57 2008: AppBackups:backup:ERROR: Cannot lock index file for writing. No locks available
Thu Jul 31 16:21:57 2008: AppBackups:backup:INFO: PHASE START: Cleanup
Thu Jul 31 16:21:57 2008: AppBackups:backup:INFO: mailing file /tmp/bjkgSFPBhZ
Thu Jul 31 16:21:57 2008: AppBackups:backup:INFO: mail command is cat "/tmp/bjkgSFPBhZ"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set AppBackups" root@localhost
Thu Jul 31 16:21:57 2008: AppBackups:backup:INFO: PHASE END: Cleanup
Thu Jul 31 16:21:57 2008: AppBackups:backup:INFO: END OF BACKUP

zmanda_jacob
July 31st, 2008, 09:35 AM
Can you please add "verbose=1" to your mysql-zrm.conf file and then run the backup again and post the logs?

Also, does the UID and GID of the "mysql" user on your ZRM server match the UID and GID of the "mysql" user on the MySQL server? This is required to prevent any permissions-related issues.

YinYang
July 31st, 2008, 11:06 AM
Can you please add "verbose=1" to your mysql-zrm.conf file and then run the backup again and post the logs?

Also, does the UID and GID of the "mysql" user on your ZRM server match the UID and GID of the "mysql" user on the MySQL server? This is required to prevent any permissions-related issues.

Already verbosed as you can see on the second line of the config

id's are identical

The thing I don't undestand why this error seems it's trying to make raw backup instead of logical

zmanda_jacob
July 31st, 2008, 12:28 PM
Can you send the output of "la -laR /var/lib/mysql" on the MySQL server end? It doesn't look like it is doing a raw backup, but even with a logical backup it still tries to put a read lock on the database.

Also, do you get different results if you try to use the socket-copy plugin?

kkg
July 31st, 2008, 10:51 PM
Looks like the flock is failing.
Is your destination directory NFS mounted? Try pointing ZRM to a local directory.

--kkg

YinYang
August 4th, 2008, 04:44 AM
Looks like the flock is failing.
Is your destination directory NFS mounted? Try pointing ZRM to a local directory.

--kkg

You're right, destination was a NFS mount, changing the destination works like a charm. But leaves me with questions, is this a problem of permittions or NFS problems with ZRM for MySQL question ?

Can't I backup for a NFS ?

Best regards

kkg
August 4th, 2008, 04:50 AM
The issue is that flock does not work on NFS. If you dont mind doing without locks, you can just comment out the flock code and go ahead. Only ensure that during the backup nobody else modifies the index file.

--kkg

YinYang
August 19th, 2008, 07:30 AM
Maybe that information should be on the documentation I didn't find anything about that.

paddy
August 19th, 2008, 02:03 PM
Maybe that information should be on the documentation I didn't find anything about that.

We are removing the lock in the next release.

Paddy