1

My MyISAM tables got corrupted(I guess due to fs corruption)

filesystem_cstor.MDS_DATA
warning  : Table is marked as crashed
warning  : Table is marked as crashed
error    : Key in wrong position at page 228804608
error    : Corrupt

filesystem_cstor.OSS_DATA
warning  : Table is marked as crashed and last repair failed
warning  : Size of datafile is: 94746       Should be: 0
error    : got error: 0 when reading datafile at record: 5237
error    : Corrupt

filesystem_cstor.OST_DATA
warning  : Table is marked as crashed
warning  : Found row where the auto_increment column has the value 0
error    : Found 396340 keys of 394727
error    : Corrupt

filesystem_cstor.TIMESTAMP_INFO
warning  : Table is marked as crashed
error    : Can't read key from filepos: 285765632
Error    : Incorrect key file for table './filesystem_cstor/TIMESTAMP_INFO.MYI'; try to repair it
error    : Corrupt

filesystem_cstor.migrate_version
Error    : Table 'filesystem_cstor.migrate_version' doesn't exist
status   : Operation failed

Later we fixed the fs issues and I tried to recover from the corrupted tables above using following command,

mysqlcheck -A --auto-repair

But my repair operation failed with the following error,

Repairing tables
filesystem_cstor.MDS_DATA                          OK
filesystem_cstor.OSS_DATA
warning  : Duplicate key for record at 18683 against record at 17170
warning  : Duplicate key for record at 20196 against record at 17170
warning  : Duplicate key for record at 21709 against record at 17170
warning  : Duplicate key for record at 23222 against record at 17170
warning  : Duplicate key for record at 24735 against record at 17170
warning  : Duplicate key for record at 26248 against record at 17170
warning  : Duplicate key for record at 27761 against record at 17170
warning  : Duplicate key for record at 29274 against record at 17170
warning  : Duplicate key for record at 30787 against record at 17170
warning  : Duplicate key for record at 32300 against record at 17170
warning  : Duplicate key for record at 33813 against record at 17170
warning  : Duplicate key for record at 35326 against record at 17170
.....
warning  : Duplicate key for record at 87584 against record at 17986
warning  : Number of rows changed from 0 to 993
status   : OK

filesystem_cstor.OST_DATA
warning  : Duplicate key for record at 11684489 against record at 9189589
warning  : Duplicate key for record at 10433074 against record at 8973222
warning  : Duplicate key for record at 12141745 against record at 11931356
warning  : Duplicate key for record at 9403943 against record at 8749596
warning  : Duplicate key for record at 11491119 against record at 10110506
warning  : Duplicate key for record at 9982772 against record at 8945406
warning  : Duplicate key for record at 11921962 against record at 8427943
warning  : Duplicate key for record at 10573313 against record at 10246353
warning  : Duplicate key for record at 8797969 against record at 8795285
warning  : Duplicate key for record at 8815781 against record at 8807668
warning  : Duplicate key for record at 10536347 against record at 10523110
...
warning  : Number of rows changed from 394727 to 293275
filesystem_cstor.TIMESTAMP_INFO                    OK

filesystem_cstor.migrate_version
Error    : Table 'filesystem_cstor.migrate_version' doesn't exist
status   : Operation failed

Here I can see that except one all the tables have been successfully recovered. The one that failed is failing due to table doesn't exist.

  1. I do not understand why I am getting this issue because that table was initially present. Could it be a chance that fs corruption has eated up this file and corrupted it's .frm or .myi file?

  2. What does the error mean,

    warning : Duplicate key for record at 10536347 against record at 10523110

Does this mean that someof the data would be lost, this is what I got from the following line,

warning  : Number of rows changed from 394727 to 293275

I would really appreciate pointers links or direct answers. Thanks!

  • It is past time to move from MyISAM to InnoDB. Tips on the conversion. – Rick James May 10 '17 at 20:35
  • that we have already done in our newer version, but we have to support older as well. – Bhupesh Pant May 19 '17 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.