How to set a non default zstd compression level at btrfs filesystem defragment?












3















# btrfs filesystem defragment -r -v -czstd:15 /
ERROR: unknown compression type zstd:15
# btrfs filesystem defragment -r -v -czstd_15 /
ERROR: unknown compression type zstd_15
# btrfs filesystem defragment -r -v -czstd15 /
ERROR: unknown compression type zstd15


The btrfs manual page doesn't give the clue on how to select a compression level:




-c[algo]



compress file contents while defragmenting. Optional argument selects the compression algorithm, zlib (default), lzo or zstd.
Currently it’s not possible to select no compression. See also section
EXAMPLES.




How to select a non-default zstd compression level to re-compress existing btrfs filesystems?







Note: btrfs filesystem defragment on snapshots might result in much larger disk space consumption:




Warning: Defragmenting with Linux kernel versions < 3.9 or ≥ 3.14-rc2
as well as with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or ≥
3.13.4 will break up the ref-links of COW data (for example files copied with cp --reflink, snapshots or de-duplicated data). This may
cause considerable increase of space usage depending on the broken up
ref-links.











share|improve this question





























    3















    # btrfs filesystem defragment -r -v -czstd:15 /
    ERROR: unknown compression type zstd:15
    # btrfs filesystem defragment -r -v -czstd_15 /
    ERROR: unknown compression type zstd_15
    # btrfs filesystem defragment -r -v -czstd15 /
    ERROR: unknown compression type zstd15


    The btrfs manual page doesn't give the clue on how to select a compression level:




    -c[algo]



    compress file contents while defragmenting. Optional argument selects the compression algorithm, zlib (default), lzo or zstd.
    Currently it’s not possible to select no compression. See also section
    EXAMPLES.




    How to select a non-default zstd compression level to re-compress existing btrfs filesystems?







    Note: btrfs filesystem defragment on snapshots might result in much larger disk space consumption:




    Warning: Defragmenting with Linux kernel versions < 3.9 or ≥ 3.14-rc2
    as well as with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or ≥
    3.13.4 will break up the ref-links of COW data (for example files copied with cp --reflink, snapshots or de-duplicated data). This may
    cause considerable increase of space usage depending on the broken up
    ref-links.











    share|improve this question



























      3












      3








      3


      1






      # btrfs filesystem defragment -r -v -czstd:15 /
      ERROR: unknown compression type zstd:15
      # btrfs filesystem defragment -r -v -czstd_15 /
      ERROR: unknown compression type zstd_15
      # btrfs filesystem defragment -r -v -czstd15 /
      ERROR: unknown compression type zstd15


      The btrfs manual page doesn't give the clue on how to select a compression level:




      -c[algo]



      compress file contents while defragmenting. Optional argument selects the compression algorithm, zlib (default), lzo or zstd.
      Currently it’s not possible to select no compression. See also section
      EXAMPLES.




      How to select a non-default zstd compression level to re-compress existing btrfs filesystems?







      Note: btrfs filesystem defragment on snapshots might result in much larger disk space consumption:




      Warning: Defragmenting with Linux kernel versions < 3.9 or ≥ 3.14-rc2
      as well as with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or ≥
      3.13.4 will break up the ref-links of COW data (for example files copied with cp --reflink, snapshots or de-duplicated data). This may
      cause considerable increase of space usage depending on the broken up
      ref-links.











      share|improve this question
















      # btrfs filesystem defragment -r -v -czstd:15 /
      ERROR: unknown compression type zstd:15
      # btrfs filesystem defragment -r -v -czstd_15 /
      ERROR: unknown compression type zstd_15
      # btrfs filesystem defragment -r -v -czstd15 /
      ERROR: unknown compression type zstd15


      The btrfs manual page doesn't give the clue on how to select a compression level:




      -c[algo]



      compress file contents while defragmenting. Optional argument selects the compression algorithm, zlib (default), lzo or zstd.
      Currently it’s not possible to select no compression. See also section
      EXAMPLES.




      How to select a non-default zstd compression level to re-compress existing btrfs filesystems?







      Note: btrfs filesystem defragment on snapshots might result in much larger disk space consumption:




      Warning: Defragmenting with Linux kernel versions < 3.9 or ≥ 3.14-rc2
      as well as with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or ≥
      3.13.4 will break up the ref-links of COW data (for example files copied with cp --reflink, snapshots or de-duplicated data). This may
      cause considerable increase of space usage depending on the broken up
      ref-links.








      btrfs zstd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 28 '17 at 11:19







      Pro Backup

















      asked Dec 22 '17 at 11:07









      Pro BackupPro Backup

      1,99362957




      1,99362957






















          2 Answers
          2






          active

          oldest

          votes


















          3














          Not yet (December 28th, 2017) possible:




          Q: Can I set the compression level?



          A: …, ZSTD level support is planned.




          source: https://btrfs.wiki.kernel.org/index.php/Compression






          share|improve this answer

































            1














            Try:




            $> sudo mount -o remount,compress=zlib:9,compress=zstd /




            After that command 'findmnt' displays 'compress=zstd:9' mount option :)






            share|improve this answer








            New contributor




            Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              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%2funix.stackexchange.com%2fquestions%2f412480%2fhow-to-set-a-non-default-zstd-compression-level-at-btrfs-filesystem-defragment%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              3














              Not yet (December 28th, 2017) possible:




              Q: Can I set the compression level?



              A: …, ZSTD level support is planned.




              source: https://btrfs.wiki.kernel.org/index.php/Compression






              share|improve this answer






























                3














                Not yet (December 28th, 2017) possible:




                Q: Can I set the compression level?



                A: …, ZSTD level support is planned.




                source: https://btrfs.wiki.kernel.org/index.php/Compression






                share|improve this answer




























                  3












                  3








                  3







                  Not yet (December 28th, 2017) possible:




                  Q: Can I set the compression level?



                  A: …, ZSTD level support is planned.




                  source: https://btrfs.wiki.kernel.org/index.php/Compression






                  share|improve this answer















                  Not yet (December 28th, 2017) possible:




                  Q: Can I set the compression level?



                  A: …, ZSTD level support is planned.




                  source: https://btrfs.wiki.kernel.org/index.php/Compression







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 28 '17 at 10:57

























                  answered Dec 22 '17 at 11:49









                  Pro BackupPro Backup

                  1,99362957




                  1,99362957

























                      1














                      Try:




                      $> sudo mount -o remount,compress=zlib:9,compress=zstd /




                      After that command 'findmnt' displays 'compress=zstd:9' mount option :)






                      share|improve this answer








                      New contributor




                      Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        1














                        Try:




                        $> sudo mount -o remount,compress=zlib:9,compress=zstd /




                        After that command 'findmnt' displays 'compress=zstd:9' mount option :)






                        share|improve this answer








                        New contributor




                        Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          1












                          1








                          1







                          Try:




                          $> sudo mount -o remount,compress=zlib:9,compress=zstd /




                          After that command 'findmnt' displays 'compress=zstd:9' mount option :)






                          share|improve this answer








                          New contributor




                          Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          Try:




                          $> sudo mount -o remount,compress=zlib:9,compress=zstd /




                          After that command 'findmnt' displays 'compress=zstd:9' mount option :)







                          share|improve this answer








                          New contributor




                          Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer






                          New contributor




                          Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered yesterday









                          Alexander BaranovAlexander Baranov

                          111




                          111




                          New contributor




                          Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Alexander Baranov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux 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%2funix.stackexchange.com%2fquestions%2f412480%2fhow-to-set-a-non-default-zstd-compression-level-at-btrfs-filesystem-defragment%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

                              How to make a Squid Proxy server?

                              Is this a new Fibonacci Identity?

                              19世紀