Results 1 to 9 of 9

Thread: Error locking index file

  1. #1

    Default Error locking index file

    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

  2. #2

    Default

    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.

  3. #3

    Default

    Quote Originally Posted by zmanda_jacob View Post
    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

  4. #4

    Default

    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?

  5. #5
    Join Date
    Oct 2006
    Posts
    199

    Default

    Looks like the flock is failing.
    Is your destination directory NFS mounted? Try pointing ZRM to a local directory.

    --kkg

  6. #6

    Default

    Quote Originally Posted by kkg View Post
    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

  7. #7
    Join Date
    Oct 2006
    Posts
    199

    Default

    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

  8. #8

    Default

    Maybe that information should be on the documentation I didn't find anything about that.

  9. #9
    Join Date
    Oct 2005
    Posts
    1,559

    Default

    Quote Originally Posted by YinYang View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •