View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 23 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Mar 22, 2004 10:35 am 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
If you experience system crash it is probably a good idea to check the MySQL table to ensure your tables have not become corrupted. To do this:
Code:
cd /var/lib/mysql/mythconverg
/etc/init.d/mythtv-backend stop
/etc/init.d/mysql stop
myisamchk *.MYI

It is probably a good idea to send the output to a text file for investigation..
Code:
myisamchk *.MYI >> mythconverg_check.log

After the check is complete you may see something like this:

Quote:
myisamchk: warning: Table is marked as crashed and last repair failed
myisamchk: warning: Size of indexfile is: 1331200 Should be: 1024
myisamchk: error: Found wrong record at 0
MyISAM-table 'recordedmarkup.MYI' is corrupted
Fix it using switch "-r" or "-o"

You should check the log file to see which tables are broken and need to be fixed.
Code:
more  mythconverg_check.log

You should see comething like this:
Quote:
Checking MyISAM file: capturecard.MYI
Data records: 2 Deleted blocks: 0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1
- check record links

---------

If a table is corrupt, you see something like this at the end of the check for that table:
Quote:
MyISAM-table 'videometadata.MYI' is usable but should be fixed

To fix the table:
Code:
myisamchk -r videometadata.MYI

Once you have repaired all the broken tables, you should run the check again and verify that all table are ok. You'll know all table are ok, because you should get a message stating that table X needs to be fixed... Don't forget to restart MySQL followed by the backend.

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 22, 2004 2:53 pm 
Offline
Joined: Fri Jan 09, 2004 8:30 pm
Posts: 146
Location: Reno, NV
You can do the same thing from a separate computer by using MySQL Control Center (http://www.mysql.com/downloads/mysqlcc.html). You just right click on the table(s) then go to Tools. You can choose from Analyze, Check, Optimize, Repair.

This can be done from a Windows or Linux box.


Top
 Profile  
 
PostPosted: Mon Mar 29, 2004 2:17 pm 
Offline
Joined: Sat Feb 28, 2004 12:33 pm
Posts: 72
Location: Washington Metro Area
you can try this command:

cd /var/lib/mysql/mythconverg
myisamchk -f -r *.MYI

it force repairs all broken tables


Last edited by notivo on Thu Oct 21, 2004 2:20 pm, edited 1 time in total.


Top
 Profile  
 
PostPosted: Thu Oct 14, 2004 10:44 am 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
notivo wrote:
you can try this command:

cd /var/lib/mysql/mythconverg
myisamchk -f *.MYI

it force repairs all broken tables


I don't know much about MySQL, so forgive me if this is a naive question.

Is there a reason we shouldn't make a MythTV box do this automatically on bootup, before the backend runs? Will it hurt good tables, or will it take a long time, or otherwise introduce problems you wouldn't otherwise get?

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 14, 2004 11:12 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
There are some really good reasons that force repair is not the default option... Mostly that it's not always safe. This would be kind of like your car always starting up in gear...


Top
 Profile  
 
 Post subject: database repair
PostPosted: Wed Nov 17, 2004 9:41 am 
Offline
Joined: Sat Oct 09, 2004 7:10 am
Posts: 17
I was looking for this post, and several other posts stated ...search for the post containing database and repair
Unfortunatly my searches failed because the word database was no where in this post, so here it is.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 03, 2005 7:39 pm 
I had my hda1 partition fill up for some mysterious reason and then the mythtvbackend froze up and the database got corrupted. So what I did was:

/etc/init.d/mythtv-backend stop
mysqlcheck -c -umythtv -pmythtv mythconverg

heres where I detected something was wrong with the database. Lots of error messages about tables

so then I did:

mysqlcheck -r -umythtv -pmythtv mythconverg

which attempted to repair the database. Some errors went away but about half stayed. "Error 28" which you can figure out what that means by using

perror 28

prints out that it means "disk full" or something like that

so I was starting to sweat and locate the KnoppMyth R4V5 reinstall disk and told my wife that all her Christmas shows were probably lost. So, that motivated me to keep looking.

Did some research and found this command to repair the MySQL tables


cd /var/lib/mysql/mythconverg
myisamchk -r *.MYI

which fixed all the table errors, reran

mysqlcheck -c -umythtv -pmythtv mythconverg

all errors gone, so looking good. Rebooted, and crossed my fingers.

Sweat. More sweat,

finally it booted and everything was normal. All the wifes Christmas shows were saved and I slept indoors that night. Happy endings are always nice when its snowing outside.

Andrew Lynch


Top
  
 
 Post subject:
PostPosted: Mon Feb 21, 2005 9:28 pm 
Offline
Joined: Sun Dec 05, 2004 2:20 pm
Posts: 83
Location: Michigan, USA
After repairing my tables everything worked fine for a few days. Then, suddenly, it stopped recording. It still lists scheduled recordings, but nothing gets recorded.

Some investigation showed that the hda4 (where my recordings are at) was full. I tried manually deleting the oldest recording that was supposed to auto-expire. Everything worked like it was supposed to, except that when it was done, the recording was still listed. Next, I tried to delete the file manually (getting the filename from mythweb.) This resulted in a file not found message. Apparently it is listed in the database, but there is no file to delete. This leads to an error, which seems to block the auto-expire.

Here is how I fixed it:

edit: A patch has been added to CVS which prevents this problem from stopping the auto-expirer. One partial fix, then, is to install from CVS.

1. From a console create an empty file using a text editor.
Code:
vi /myth/tv/empty.nuv


2. From the front end find the oldest auto-expire recording. Try to delete it. If this works, you have a different problem.

3. Use mythweb or something else to find the filename. From a console copy the empty.nuv file to the currupted filename.

4. From the front end delete the previously currupted file. This should work as it will delete the copy.

5. Repeat step 2 through 4 until you are confident you've cleaned out the problem. I'm not sure if this will require deleting all the files or not.

6. Delete empty.nuv

This is rather tedious, and there is probally a better way to do it, but at least it worked for me.

_________________
P3 500 Mhz, no fan | 256 MB PC100 RAM | PSU SEASONIC SUPERTORNADO-300W | HD 160GB SAMSUNG 7200 SP1604N 2MB | TV TUNER HAUPAUGE WINTV-PVR 350 (990) PCI


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 2:44 am 
Offline
Joined: Wed Mar 08, 2006 11:11 pm
Posts: 1
I was experiencing:
1) painfully slow skipping
2) commercial skip stopped working
3) recording editor would not start

I performed the steps described by cesman, which correctly identified recordedmarkup.MYI' as corrupt and repaired it.

One more step was required after repairing specifically the "recordedmarkup.MYI" database to fix the skipping problems.

mythcommflag --rebuild --all

This command rebuilds the seek table.


Top
 Profile  
 
 Post subject: Getting Error
PostPosted: Sun Jul 09, 2006 6:53 pm 
Offline
Joined: Wed Apr 19, 2006 5:18 am
Posts: 79
Location: Conroe, TX
On running the above command, I'm receiving a message "Parser not found for Codec Id: 94210 ! and also "You probably should modify the Master Server settings in the setup program and set the proper IP address".
And when I do the myisamchk -f -r *.MYI, it seems to be fixing things, but if I repeat it, it goes through the same sequence.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 06, 2006 8:05 pm 
Offline
Joined: Sat Nov 19, 2005 9:47 am
Posts: 3
spud wrote:
I was experiencing:
1) painfully slow skipping
2) commercial skip stopped working
3) recording editor would not start

I performed the steps described by cesman, which correctly identified recordedmarkup.MYI' as corrupt and repaired it.

One more step was required after repairing specifically the "recordedmarkup.MYI" database to fix the skipping problems.

mythcommflag --rebuild --all

This command rebuilds the seek table.


I had exactly the same problem, and these steps fixed it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 10, 2006 9:55 am 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
I was having the same problem.. and SQL Error in MythWeb. (I'm using R5C7) using myisamchk -r *.MYI pretty much did the trick.

Code:
cd /var/lib/mysql/mythconverg
/etc/init.d/mythtv-backend stop
/etc/init.d/mysql stop
myisamchk *.MYI -r


A couple of hints to the "newbies" would be good...

1. Should I log in as root .. or mythtv (I used root)?
2. command lines to restart mysql and mythtv-backend

Minor things.. I used root.. and I used
Code:
shutdown -r now
to restart the box.. the old Windows trick! :roll: (OK, I'm hearing the newbie joybuzzer!) :twisted:

_________________
// Brian - Hardware:
ASUS P5P800 - P4 3Ghz, 500 GB PATA HD
ASUS P5K-V - P4 Core2 Duo, 500 GB SATA HD
Hauppauge PVR-350, IR Blaster, Comcast Digital Cable
http://tech.groups.yahoo.com/group/KnoppMyth/
KnoppMyth R5F27 >> R5.5


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 10:38 am 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Quote:
A couple of hints to the "newbies" would be good...

1. Should I log in as root .. or mythtv (I used root)?
2. command lines to restart mysql and mythtv-backend


I struggled with these as well.

1) I log in as my user the SU before doing these commands. since I am modifying "System" those usually require an Super User.

2) I just reversed those commands putting start in place of "Stop"

After fixing the Tables I do this.

Code:
/etc/init.d/mysql start
/etc/init.d/mythtv-backend start
 

_________________
KnoppMyth R5.5
MBE: AMD64 3400+, K8N Neo4 Plat., 1Gig, Asus Extreme N6200, 320G pata, 2x320Gsata, 750Gsata, PVR-150 Retail w/Blaster
SBE: AMD XP2000, GA 7ZMMH, 1 Gig, XFX 256M 6200, 20 Gig, PVR-150 Retail w/Blaster
SBE: AMD Dur1800, 512M, PVR500


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 6:38 am 
Offline
Joined: Fri Feb 03, 2006 11:36 pm
Posts: 63
Location: Melbourne
I had this problem. The /usr/sbin/mysqld and the /usr/share/mysql were completely gone. I started copying files from an old installation I had but gave up. I fixed it by reinstalling mysql using apt-get mysql-server. The check indicated no corruption of the database.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 22, 2007 4:20 am 
Offline
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location: UK
Just to say thanks for the fix.

Bruce S.

_________________
Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P
16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD,
SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080
Hauppauage Nova-T 500, Nova-T LinHes R8.6.1


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu