SUSE Support

Here When You Need Us

smt-mirror fails with errors

This document (7007778) is provided subject to the disclaimer at the end of this document.

Environment

Subscription Management Tool (SMT) for SUSE Linux Enterprise 11
Subscription Management Tool (SMT) for SUSE Linux Enterprise 10

Situation

An smt-mirror instance had started and was interrupted. In this case the server went down and was brought back up. When attempting to start the smt-mirror again it returned the following errors:

Target:    /srv/www/htdocs/repo/$RCE/SLES11-Updates/sle-11-x86_64
D /srv/www/htdocs/repo/$RCE/SLES11-Updates/sle-11-x86_64/.repodata/repomd.xml
DBD::mysql::db selectall_hashref failed: statement contains no result [err was 4 now 2000000000]
Field 'localpath' does not exist (not one of ) at /usr/lib/perl5/vendor_perl/5.10.0/SMT/Mirror/RpmMd.pm line 637.
DBD::mysql::db selectall_hashref failed: statement contains no result [err was 4 now 2000000000]
Field 'localpath' does not exist (not one of ) at /usr/lib/perl5/vendor_perl/5.10.0/SMT/Mirror/RpmMd.pm line 637.

Resolution

In this case the reason for the errors is that the MySQL table is marked as crashed and needs to be repaired. To determine the issue, and attempt a repair of the table you can follow these steps:

1. mysqlcheck [options] dbname tablename (for example mysqlcheck -uroot -p db smt_stats)
error    : Table './wsu/smt_stats' is marked as crashed and should be repaired
2. /etc/init.d/mysql stop (to stop the mysql service)
3. myisamchk tablename (this will prompt you with the switches needed to fix the errors.)

myisamchk: error: Recordlink that points outside datafile at 10473420
MyISAM-table 'smt_stats.SMT' is corrupted
Fix it using switch "-r" or "-o"


4. mysamchk -r smt_stats.SMT

- recovering (with sort) MyISAM-table 'smt_stats.SMT'
Data records: 139144
- Fixing index 1
Found block that points outside data file at 10473420

5.
myisamchk dbname (run again to make sure no more errors are reported)
6. /etc/init.d/mysql start


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7007778
  • Creation Date: 03-Feb-2011
  • Modified Date:03-Mar-2020
    • Subscription Management Tool
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.