MyISAM-table '/var/lib/mysql/zm/Frames.MYI' is not fixed bec

Support and queries relating to all previous versions of ZoneMinder
Locked
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

MyISAM-table '/var/lib/mysql/zm/Frames.MYI' is not fixed bec

Post by jameswilson »

Code: Select all

 myisamchk -f  /var/lib/mysql/*/Frames.MYI -f
Checking MyISAM file: /var/lib/mysql/zm/Frames.MYI
Data records: 4805800   Deleted blocks:       0
myisamchk: warning: Table is marked as crashed and last repair failed
- check file-size
myisamchk: warning: Size of indexfile is: 245637120      Should be: 88667136
myisamchk: warning: Size of datafile is: 194880000       Should be: 144174000
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check data record references index: 2
- check data record references index: 3
myisamchk: error: Can't read indexpage from filepos: -1
- recovering (with sort) MyISAM-table '/var/lib/mysql/zm/Frames.MYI'
Data records: 4805800
- Fixing index 1
- Fixing index 2
- Fixing index 3
myisamchk: Error writing file '/var/lib/mysql/zm/Frames.MYI' (Errcode: 5)
myisamchk: error: 5 when fixing table
MyISAM-table '/var/lib/mysql/zm/Frames.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
Cant fix this, tried mysqlcheck and myisamchk, any pointers?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post by maclellan »

It's simple - dont use myisam, but instead use innodb. This can be done my modifyng the SQL database creation script with 'engine = INNODB'. you can search the mysql site for more info on this.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

really im intrieged
id like a script that could be cron'd and do this repair all the time. this one was beyond repair and cordel had to explain dropping tables to me.
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Locked