Ad Widget

Collapse

MySQL space incrementing after update to 5.0 while partitionning

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • y4nn1ck
    Junior Member
    • Aug 2020
    • 22

    #1

    MySQL space incrementing after update to 5.0 while partitionning

    Hello,
    I've been using zabbix in a partition mode for the last year and it's been great. My Database has been hovering around 250gig. But since i've upgraded to 5.x LTS, the space used by MySQL has been incrementing on a daily basis.

    First i thought my partitioning was not working but when i check my zabbix database folder I do have :

    Click image for larger version

Name:	zabbixHistoryPartitions.png
Views:	185
Size:	14.4 KB
ID:	413225

    So we can see that it's creating a partition everyday and i keep a month. There is nothing before Oct 17th. So the cron job i created works!

    My main issue is when i check my MySQL folder and i see this :

    Click image for larger version

Name:	zabbixMySqlDB.png
Views:	156
Size:	4.4 KB
ID:	413226
    I can confirm that MySQL is using 1 file per table :

    mysql> show variables like '%per_table%';
    +-----------------------+-------+
    | Variable_name | Value |
    +-----------------------+-------+
    | innodb_file_per_table | ON |
    +-----------------------+-------+


    I'm at a lost as to what to do exactly.. Any inputs?

  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Database was created when innodb_file_per_table was off by default.

    You need to dump all data and re-create from scratch database. You cannot use binary/hot backup tools here.

    Upgrade to latest 5.7/8.0 release, use MySQL shell to backup data. Drop database and create new one according to the manual. Load data back.

    Information about MySQL baskups using Shell utility.
    https://mysqlserverteam.com/mysql-sh...d-part-1-demo/

    Not related to the Zabbix.

    Comment

    • y4nn1ck
      Junior Member
      • Aug 2020
      • 22

      #3
      Thanks for the input, but you say it's not related to Zabbix while i can assure you it was working as intended prior to the upgrade to Zabbix 5.0. So it got me thinking that the upgrade might've broken the partitioning..

      Click image for larger version

Name:	zabbixDiskUsage.png
Views:	66
Size:	90.8 KB
ID:	413580
      Last edited by y4nn1ck; 20-11-2020, 20:03.

      Comment

      • kernbug
        Senior Member
        • Feb 2013
        • 330

        #4
        Read manual for the database used, incorrect usage of the database doesn't mean that this is a Zabbix issue.

        https://dev.mysql.com/doc/refman/8.0...ablespace.html

        Comment

        Working...