On 21 February 2011 11:08, Govind Songara <[log in to unmask]> wrote:
>
>
> On Mon, Feb 21, 2011 at 9:43 AM, Sam Skipsey <[log in to unmask]>
> wrote:
>>
>> Hi Govind,
>>
> Hi Sam,
>
>>
>> On 20 February 2011 10:49, Govind Songara <[log in to unmask]>
>> wrote:
>> > Hi Storage expert,
>> >
>> > Last Friday we had crashed of our SE which has corrupted the database.
>> >
>> > After recovery of SE, the routine mysql dump has thrown a error at first
>> > time.
>> > mysqldump: Couldn't execute 'show create table `dpm_get_filereq`': Table
>> > './dpm_db/dpm_get_filereq' is marked as crashed and last (automatic?)
>> > repair
>> > failed (144)
>> > and after this all dumps are of very less size 38M compared to earlier
>> > 1.3G.
>> >
>>
>> Do you know which other, if any, of the tables are crashed?
>> (In particular, is everything in the cns_db database okay?)
>>
> mysqlcheck tool shows that cns_db tables, mysql system tables are OK
>
Okay, so that's not so bad - your namespace is still mostly okay.
> But dpm_db table is corrupted
> dpm_db.dpm_get_filereq
> warning : Table is marked as crashed and last repair failed
> warning : 1 client is using or hasn't closed the table properly
> warning : Size of indexfile is: 1192263680 Should be: 1024
> error : Can't read indexpage from filepos: -1
> Error : Incorrect key file for table './dpm_db/dpm_get_filereq.MYI'; try
> to repair it
> error : Corrupt
>
>
Hm. I'm not convinced that that isn't repairable, but...
>
>>
>> > For this error message Mysql froum suggest a manual repair required, not
>> > sure how to do that ??
>> >
>>
>> Well, my first suggestion (REPAIR TABLE) apparently doesn't work for
>> InnoDB databases...
>> The documentation for attempting to repair an InnoDB database is here:
>> http://dev.mysql.com/doc/refman/5.0/en/forcing-innodb-recovery.html
>> but, obviously, make copies of your backups and tables before you do
>> anything!
>> (And stop the mysql server if you haven't already...)
>
> I have stop it now
>>
>
>> I would be inclined to try to restore from the dump (+binary logs). I
>> *assume* that you have valid backups from before the crash
>> happened...?
>
> We have regular backup ofy backup of mysqldump only, does not have backup
> of binary logs.
> But there are some .bin file in our mysql dir, this one from same time when
> crash happens.
> -rw-rw---- 1 mysql mysql 857375494 Feb 18 13:37 mysqld-bin.000049
>
> Rest of .bin are created after recovering SE.
>
> I know about restoring from from .sql file , but how to use it with binary
> logs
You basically restore from the dump, and then do something like
mysqlbinlog namesofbinarylogsinorder.0001 namesofbinarylogsinorder.0002 | mysql
where the list of the logs includes all of them from the time of the
last dump up to the time of the crash (it might not be safe to
continue past that point, since at least one table was in an undefined
state).
Obviously, keep copies of the files around incase this doesn't work properly.
(Documentation for recovery with binary logs is here:
http://dev.mysql.com/doc/refman/5.0/en/recovery-from-backups.html
)
Sam
>
> Thanks
>
>>
>> Sam
>> >
>> > Kindly advise, thanks in advance.
>> >
>> >
>> > Regards
>> > Govind
>> >
>> >
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 5891 (20110220) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>
>
|