shrink ibdata1 in Galera Cluster












0















I'm having a Galera cluster (3 nodes, but currently using only one), MariaDB 10.0 Galera.



However, my ibdata1 is growing HUGE (although using inno_file_per_table=1).



Now i want to "shrink" it by using mysqldump (see here) but this is a really time consuming task for my load (around 12-15 hours, tried it with an equal server)
The database size we are talking about is around 150G (and ibdata1 grew to 163G over years due to unclever decisions). Now my main goal is to reduce downtime, say: Only the time it takes to create the dump.



My idea was to use mysqldump as SST method, but: How long is the cluster blocked? Only the time it takes to create the mysqldump or the time it takes to create + recover on the joiner?



Do you have another idea to do this with a small downtime?










share|improve this question
















bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I'm having a Galera cluster (3 nodes, but currently using only one), MariaDB 10.0 Galera.



    However, my ibdata1 is growing HUGE (although using inno_file_per_table=1).



    Now i want to "shrink" it by using mysqldump (see here) but this is a really time consuming task for my load (around 12-15 hours, tried it with an equal server)
    The database size we are talking about is around 150G (and ibdata1 grew to 163G over years due to unclever decisions). Now my main goal is to reduce downtime, say: Only the time it takes to create the dump.



    My idea was to use mysqldump as SST method, but: How long is the cluster blocked? Only the time it takes to create the mysqldump or the time it takes to create + recover on the joiner?



    Do you have another idea to do this with a small downtime?










    share|improve this question
















    bumped to the homepage by Community 3 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I'm having a Galera cluster (3 nodes, but currently using only one), MariaDB 10.0 Galera.



      However, my ibdata1 is growing HUGE (although using inno_file_per_table=1).



      Now i want to "shrink" it by using mysqldump (see here) but this is a really time consuming task for my load (around 12-15 hours, tried it with an equal server)
      The database size we are talking about is around 150G (and ibdata1 grew to 163G over years due to unclever decisions). Now my main goal is to reduce downtime, say: Only the time it takes to create the dump.



      My idea was to use mysqldump as SST method, but: How long is the cluster blocked? Only the time it takes to create the mysqldump or the time it takes to create + recover on the joiner?



      Do you have another idea to do this with a small downtime?










      share|improve this question
















      I'm having a Galera cluster (3 nodes, but currently using only one), MariaDB 10.0 Galera.



      However, my ibdata1 is growing HUGE (although using inno_file_per_table=1).



      Now i want to "shrink" it by using mysqldump (see here) but this is a really time consuming task for my load (around 12-15 hours, tried it with an equal server)
      The database size we are talking about is around 150G (and ibdata1 grew to 163G over years due to unclever decisions). Now my main goal is to reduce downtime, say: Only the time it takes to create the dump.



      My idea was to use mysqldump as SST method, but: How long is the cluster blocked? Only the time it takes to create the mysqldump or the time it takes to create + recover on the joiner?



      Do you have another idea to do this with a small downtime?







      mysql mariadb maintenance galera ibdata






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 23 '17 at 12:40









      Community

      1




      1










      asked Jul 18 '16 at 7:02









      StefanStefan

      1011




      1011





      bumped to the homepage by Community 3 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 3 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I don't think you have many options here. If you want to maintain high availability I'd say shutdown on node and configure it as a replication slave of one of the cluster nodes. Rebuild it from a mysqldump of the cluster node. Once slave catches up, restart it as wsrep node 1 of a new cluster and then promote it as master. Shutdown the other two nodes of the old cluster and empty datadir, and let each join one at a time to the new cluster. Others may have a better suggestion though.






          share|improve this answer
























          • Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

            – Stefan
            Jul 18 '16 at 13:59











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f144164%2fshrink-ibdata1-in-galera-cluster%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I don't think you have many options here. If you want to maintain high availability I'd say shutdown on node and configure it as a replication slave of one of the cluster nodes. Rebuild it from a mysqldump of the cluster node. Once slave catches up, restart it as wsrep node 1 of a new cluster and then promote it as master. Shutdown the other two nodes of the old cluster and empty datadir, and let each join one at a time to the new cluster. Others may have a better suggestion though.






          share|improve this answer
























          • Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

            – Stefan
            Jul 18 '16 at 13:59
















          0














          I don't think you have many options here. If you want to maintain high availability I'd say shutdown on node and configure it as a replication slave of one of the cluster nodes. Rebuild it from a mysqldump of the cluster node. Once slave catches up, restart it as wsrep node 1 of a new cluster and then promote it as master. Shutdown the other two nodes of the old cluster and empty datadir, and let each join one at a time to the new cluster. Others may have a better suggestion though.






          share|improve this answer
























          • Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

            – Stefan
            Jul 18 '16 at 13:59














          0












          0








          0







          I don't think you have many options here. If you want to maintain high availability I'd say shutdown on node and configure it as a replication slave of one of the cluster nodes. Rebuild it from a mysqldump of the cluster node. Once slave catches up, restart it as wsrep node 1 of a new cluster and then promote it as master. Shutdown the other two nodes of the old cluster and empty datadir, and let each join one at a time to the new cluster. Others may have a better suggestion though.






          share|improve this answer













          I don't think you have many options here. If you want to maintain high availability I'd say shutdown on node and configure it as a replication slave of one of the cluster nodes. Rebuild it from a mysqldump of the cluster node. Once slave catches up, restart it as wsrep node 1 of a new cluster and then promote it as master. Shutdown the other two nodes of the old cluster and empty datadir, and let each join one at a time to the new cluster. Others may have a better suggestion though.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 18 '16 at 10:58









          jerichoriverajerichorivera

          61745




          61745













          • Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

            – Stefan
            Jul 18 '16 at 13:59



















          • Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

            – Stefan
            Jul 18 '16 at 13:59

















          Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

          – Stefan
          Jul 18 '16 at 13:59





          Hey, thanks for the suggestion. Tried that yesterday, but there seemed to be problems with that approach, because both servers are galera servers. I don't want to risk data loss and additional downtime for recovery when i uninstall the galera part of the mysql server.

          – Stefan
          Jul 18 '16 at 13:59


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f144164%2fshrink-ibdata1-in-galera-cluster%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Liste der Baudenkmale in Friedland (Mecklenburg)

          Single-Malt-Whisky

          Czorneboh