The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cpbackup toasted tables in MySQL :| not cool

Discussion in 'Data Protection' started by kickedmydog, Aug 19, 2005.

  1. kickedmydog

    kickedmydog Well-Known Member

    Joined:
    Oct 28, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Last night I was browsing through my cron/cpbackup log and noticed some disturbing information.

    Appears cpbackup tried to dump a minor size database and locked the tables so they are unlockable. I went in and tried to unlock them from phpMyAdmin and nothing works.

    Luckly two of the three affected databases were only on my site, not customers and I had a local database to restore the tables I had to remove and put back.

    This is the error I got in my email from cron.
    mysqldump: Got error: 1017: Can't find file: 'orders_pay_methods.MYI' (errno: 2) when using LOCK TABLES
    mysqldump: Got error: 1017: Can't find file: 'active_sessions.MYI' (errno: 2) when using LOCK TABLES
    mysqldump: Got error: 1017: Can't find file: 'orders_pay_methods.MYI' (errno: 2) when using LOCK TABLES .........
    Done

    For 'active_sessions' is only one of a few 100 tables that got locked in that database.

    Seems like all the MYI files are missing out of the database root folder.

    Has this happened to anyone ever?


    Server Info
    Redhate EL3 2.4.21-32.0.1.ELsmp
    Apache 1.33 php 4.3.10 mysql (4.1.13-standard)

    Dual Xeon 2.8 HT w/ 1GB


    Also I notice my Apache Status in WHM is not working anymore too. :confused:
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Could it be that your /tmp partition is running out of space overnight? Since the temporary MySQL files are stored in /tmp I have seen similar issues happen when /tmp has insufficient space to accomodate them. These days, you're going to need around 1GB for /tmp I've found and keep it neat and tidy.

    If that's defintiely not it, then ignore me :)
     
  3. kickedmydog

    kickedmydog Well-Known Member

    Joined:
    Oct 28, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    /tmp

    I have a full 1GB of TMP space... :(
     
  4. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
    The MySQL files are stored under /var/lib/mysql and sometimes /var is mounted on separate partition (like /tmp mentioned abover) and can also run out of space. Any issue there you think?
     
  5. kickedmydog

    kickedmydog Well-Known Member

    Joined:
    Oct 28, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Nope

    I have total control server that is Dual Xeon 2.8 with 160GB storage...and a handful of web sites on them. Drive space is very free in all areas except boot is getting a bit cluttered.
     
  6. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
    Whan you are trying to unlock from phpmyadmin, what user are you logged in as? Try root?

    Also, have you tried /scripts/fixmysql ?
     
  7. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    As mentioned above, go to your /var/lib/mysql and see if the database and the MYI files exist. If they do there may be corruption in the tables creating the errors.

    Try fixing the database using safe mode:

    At root shell stop the following services
    /etc/rc.d/init.d/chkservd stop
    /etc/rc.d/init.d/mysql stop

    Change directory
    cd /var/lib/mysql

    Then scan the database files for errors:
    myisamchk -cs databasename/*.MYI

    You will know from the output if there are errors. Run the following to fix the tables
    myisamchk -o databasename/*.MYI

    We use -o as the option because we want to use a safe mode fix.

    restart the services
    /etc/rc.d/init.d/chkservd start
    /etc/rc.d/init.d/mysql start

    you may want to restart MySQL from WHM or at the command line as well
    /scripts/restartsrv mysql

    Tell us the results.
     
Loading...

Share This Page