[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] small mysql patch

Today I removed all the additional indexes from the table File (in my
production bacula server).
And re-indexes, which are specified in src/cats/make_mysql_tables.in

I would like once again to check how the dbcheck worked.
This will take some time.
The results, I will announce later.

I still want to check it for PostgreSQL.

2008/9/7 Dan Langille <dan@xxxxxxxxxxxx>:
> Yuri Timofeev wrote:
>> 2008/9/5 Kern Sibbald <kern@xxxxxxxxxxx>:
>>> From what I understand, it *does* work, but just slowly. It is not
>>> correct to say that nothing is done.  It has been working and doing its job
>>> it may have even been removing orphaned records in this time.
>> No. This is not a work.
>> Mysql all the time (3 days) performs the same request:
>>       (File.JobId = Job.JobId) WHERE Job.JobId IS NULL LIMIT 300000;
>> Orphaned records are not deleted.
>> There was a difference between 3 days and 3 minutes.
>> dbcheck does not solve the problem of disk space and you as a
>> developer, it should be well known.
> Correct.  dbcheck does not solve the disk space issue.

That's what I had in mind.

Free space on a my disk (Archive Device) 20-30 Gb or more.
In some days you need backup a lot of data.
Sometimes space on your disk ends.
Meanwhile, all Jobs "hang".
And some Volumes may be corrupt.
Next, I stop bacula, stop mysql, reallocate disk space (and create
symlinks for Volumes).
Run bscan.

If bscan shows:

--- bscan.log ---
02-May 12:54 bscan JobId 0: Error: block.c:1091 Volume data error at
0:243791081! Short block of 56086 bytes o
n device "dev.file.storage.1" (/arc/dev) discarded.
02-May 12:54 bscan JobId 0: Error: read_record.c:142 block.c:1091
Volume data error at 0:243791081! Short bloc
k of 56086 bytes on device "dev.file.storage.1" (/arc/dev) discarded.

So in the future with this damaged Volume restore  files can not be.

In bconsole:
delete media volume=<damaged-volume-name>

Check MySQL database: myisamchk.
Start mysqld, bacula.
Restart Jobs.

Currently, more than 2 years work:
- In BD Catalog in the table File are about 8 million records.
- Of them - 300 thousand (according to the bcheck) is orphaned.

That is why I and the run dbcheck.

> We would happily review a patch that does.

with best regards

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.