LinHES Forums
http://forums.linhes.org/

Database Schema upgrade FAILED, unlocking.
http://forums.linhes.org/viewtopic.php?f=9&t=16206
Page 1 of 1

Author:  diblasio [ Fri Aug 24, 2007 9:38 am ]
Post subject:  Database Schema upgrade FAILED, unlocking.

I had a hard lock on my mythbox requiring a reboot. On reboot I got a message like this...
Code:
dave@mythtv:~$ mythfrontend
2007-08-24 10:10:52.012 Using runtime prefix = /usr
2007-08-24 10:10:52.019 DPMS is not supported.
2007-08-24 10:10:52.064 New DB connection, total: 1
2007-08-24 10:10:52.071 Connected to database 'mythconverg' at host: localhost
2007-08-24 10:10:52.074 Total desktop dim: 1024x768, with 1 screen[s].
2007-08-24 10:10:52.088 Using screen 0, 1024x768 at 0,0
2007-08-24 10:10:52.126 Current Schema Version:
2007-08-24 10:10:52.127 Newest Schema Version : 1160
2007-08-24 10:10:52.128 New DB connection, total: 2
2007-08-24 10:10:52.129 Connected to database 'mythconverg' at host: localhost
2007-08-24 10:10:52.130 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-08-24 10:10:52.131 New DB connection, total: 3
2007-08-24 10:10:52.132 Connected to database 'mythconverg' at host: localhost
2007-08-24 10:10:52.135 Told to create a NEW database schema, but the database
already has 75 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-08-24 10:16:02.979 Database Schema upgrade FAILED, unlocking.
2007-08-24 10:16:02.980 Couldn't upgrade database to new schema, exiting.


So I did
Code:
cd /var/lib/mysql/mythconverg
root@mythtv:/home/dave# mysql mythconverg -e "select * from settings order by value;"
ERROR 145 (HY000) at line 1: Table './mythconverg/settings' is marked as crashed and should be repaired


I guess I have to repair something

Code:
 /etc/init.d/mysql stop
Stopping MySQL database server: mysqld.

Code:
root@mythtv:/var/lib/mysql/mythconverg# myisamchk *.MYI >> mythconverg_check.log
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: error: Record at pos: 17044 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
myisamchk: error: Found 456 keys of 455
myisamchk: error: Record-count is not ok; is 456          Should be: 455
myisamchk: warning: Found 80 deleted space.   Should be 128
myisamchk: warning: Found          3 deleted blocks       Should be: 4
MyISAM-table 'settings.MYI' is corrupted
Fix it using switch "-r" or "-o"

Corruption? Strange. Guess I better fix it...

Code:
 myisamchk -r *.MYI >> mythconverg_check.log


Next restarted sql

Code:
root@mythtv:/var/lib/mysql/mythconverg# /etc/init.d/mysql start                 Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..


and mythbackend

Code:
root@mythtv:/var/lib/mysql/mythconverg# /etc/init.d/mythtv-backend start        Starting MythTV server: mythbackend.


My only real question right now is did I just screw up something that I won't notice until later?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/