LVM: how to always show Pfree in GB











up vote
-1
down vote

favorite
1












pvs shows Pfree in MB or GB:



pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg50 lvm2 a-- 1.09t 950.16g


pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg60 lvm2 a-- 149.51g 944.00m


How we can get Pfree only in GB?



Or is there another LVM command that always shows Pfree in GB?










share|improve this question




























    up vote
    -1
    down vote

    favorite
    1












    pvs shows Pfree in MB or GB:



    pvs
    PV VG Fmt Attr PSize PFree
    /dev/sda2 vg50 lvm2 a-- 1.09t 950.16g


    pvs
    PV VG Fmt Attr PSize PFree
    /dev/sda2 vg60 lvm2 a-- 149.51g 944.00m


    How we can get Pfree only in GB?



    Or is there another LVM command that always shows Pfree in GB?










    share|improve this question


























      up vote
      -1
      down vote

      favorite
      1









      up vote
      -1
      down vote

      favorite
      1






      1





      pvs shows Pfree in MB or GB:



      pvs
      PV VG Fmt Attr PSize PFree
      /dev/sda2 vg50 lvm2 a-- 1.09t 950.16g


      pvs
      PV VG Fmt Attr PSize PFree
      /dev/sda2 vg60 lvm2 a-- 149.51g 944.00m


      How we can get Pfree only in GB?



      Or is there another LVM command that always shows Pfree in GB?










      share|improve this question















      pvs shows Pfree in MB or GB:



      pvs
      PV VG Fmt Attr PSize PFree
      /dev/sda2 vg50 lvm2 a-- 1.09t 950.16g


      pvs
      PV VG Fmt Attr PSize PFree
      /dev/sda2 vg60 lvm2 a-- 149.51g 944.00m


      How we can get Pfree only in GB?



      Or is there another LVM command that always shows Pfree in GB?







      linux lvm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 14 at 13:22









      Stephen Kitt

      156k23343416




      156k23343416










      asked Nov 14 at 10:46









      yael

      2,3061753




      2,3061753






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          8
          down vote



          accepted










          You can force pvs (and other LVM tools) to use a specific unit with the --units option:



          pvs --units g


          will show all values in gibibytes (multiples of 1024). Use



          pvs --units G


          if you want gigabytes (multiples of 1000).






          share|improve this answer





















            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',
            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%2f481674%2flvm-how-to-always-show-pfree-in-gb%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








            up vote
            8
            down vote



            accepted










            You can force pvs (and other LVM tools) to use a specific unit with the --units option:



            pvs --units g


            will show all values in gibibytes (multiples of 1024). Use



            pvs --units G


            if you want gigabytes (multiples of 1000).






            share|improve this answer

























              up vote
              8
              down vote



              accepted










              You can force pvs (and other LVM tools) to use a specific unit with the --units option:



              pvs --units g


              will show all values in gibibytes (multiples of 1024). Use



              pvs --units G


              if you want gigabytes (multiples of 1000).






              share|improve this answer























                up vote
                8
                down vote



                accepted







                up vote
                8
                down vote



                accepted






                You can force pvs (and other LVM tools) to use a specific unit with the --units option:



                pvs --units g


                will show all values in gibibytes (multiples of 1024). Use



                pvs --units G


                if you want gigabytes (multiples of 1000).






                share|improve this answer












                You can force pvs (and other LVM tools) to use a specific unit with the --units option:



                pvs --units g


                will show all values in gibibytes (multiples of 1024). Use



                pvs --units G


                if you want gigabytes (multiples of 1000).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 14 at 10:50









                Stephen Kitt

                156k23343416




                156k23343416






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481674%2flvm-how-to-always-show-pfree-in-gb%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

                    Morgemoulin

                    Scott Moir

                    Souastre