Skip to main content

I have an issue with lost .par file content for all centreon_storage partitioning tables on remote server.

Couldn't get partition infos for table 'centreon_storage.data_bin'

Couldn't get partition infos for table 'centreon_storage.logs'

Couldn't get partition infos for table 'centreon_storage.log_archive_service'

Couldn't get partition infos for table 'centreon_storage.log_archive_host'

 

>root@AAAAAAAAAA centreon_storage]# ls -alh data_bin*

-rw-rw---- 1 mysql mysql  27K Jun 19 02:00 data_bin.frm

-rw-rw---- 1 mysql mysql    0 Jun 19 02:00 data_bin.par

-rw-rw---- 1 mysql mysql 136M Jun 19  2022 data_bin#P#p20220619.ibd

-rw-rw---- 1 mysql mysql 132M Jun 20  2022 data_bin#P#p20220620.ibd

-rw-rw---- 1 mysql mysql 132M Jun 21  2022 data_bin#P#p20220621.ibd

………………………..

-rw-rw---- 1 mysql mysql 112K Jun 16 04:06 data_bin#P#p20230626.ibd

-rw-rw---- 1 mysql mysql 112K Jun 17 04:00 data_bin#P#p20230627.ibd

-rw-rw---- 1 mysql mysql 112K Jun 18 04:00 data_bin#P#p20230628.ibd

-rw-rw---- 1 mysql mysql 112K Jun 18 04:00 data_bin#P#pmax.ibd

 

Looks like it happened during partition script was running while system was forcibly switched off.

I didn’t find any low hanging solution in general MySQL/MariaDB searches as any actions on partitioned tables has come to same error about missing par file.

MariaDB acentreon_storage]> alter table log_archive_service check partition p20230206;

+----------+-----------------------------------+

| Msg_type | Msg_text                          |

+----------+-----------------------------------+

| Error    | Failed to read from the .par file |

| error    | Corrupt                           |

+----------+-----------------------------------+

2 rows in set (0.011 sec)

 

And now, it’s not possible export config to RS.

MariaDB dcentreon]> SELECT * FROM task where id > 862 ;

+------+--------+-----------+-----------+--------+---------------------+

| id   | type   | status    | parent_id | params | created_at          |

+------+--------+-----------+-----------+--------+---------------------+

|  863 | import | completed |      6862 | a:0:{} | 2022-01-12 12:14:09 |

|  864 | import | completed |      6863 | a:0:{} | 2022-01-12 12:16:30 |

|  865 | import | completed |      6874 | a:0:{} | 2022-01-14 09:15:02 |

|  866 | import | completed |      6885 | a:0:{} | 2022-01-14 14:08:13 |

|  867 | import | completed |      6886 | a:0:{} | 2022-01-14 14:31:20 |

| 2033 | import | failed    |     10520 | NULL   | 2023-07-06 16:52:12 |

+------+--------+-----------+-----------+--------+---------------------+

6 rows in set (0.000 sec)

 

Can you help me to figure out a procedure to recover DB operation?

My idea is :

  1. Export Central server Centreon_storage partitioned tables schema,
  2. Stop MariaDB service on RS,
  3. Remove all tables (with partitioning) files from RS,
  4. Import table schemas to RS,
  5. Start MariaDB service on RS,
  6. And magically, RS DB service will suck in all need data to related tables from central.
  7. Or recreate RS from beginning?

P.S.

centreon_storage]# grep -C 3 partit /var/log/centreon/centreon-partitioning.log

Sun, 09 Jul 23 04:00:01 +0200] PARTITIONING STARTED

Sun, 09 Jul 23 04:00:01 +0200] Cannot get partition information

lMon, 10 Jul 23 04:00:01 +0200] PARTITIONING STARTED

lMon, 10 Jul 23 04:00:01 +0200] Cannot get partition information

Update:

First 5 steps was successful.

  1. Export Central server Centreon_storage partitioned tables schema,
  2. Stop MariaDB service on RS,
  3. Remove all tables (with partitioning) files from RS,
    1. copy config.fpm/ibd in place of removed tables with file rename,
  4. Start MariaDB service on RS,
  5. drop tables (renamed) to remove partitioned tables traces.
  6. Import table schemas to RS,
  7. mysqlcheck - OK.

 


Reply