ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Trying to get accurate disk usage info from CentOS

    Scheduled Pinned Locked Moved Solved IT Discussion
    19 Posts 7 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ObsolesceO
      Obsolesce
      last edited by

      Not sure what I'm missing...

      I'm running the "df -hT" command to see the used disk space. This is what I get:

      0_1488908323897_Untitled.jpg

      That's all good, but it's missing lv_home and lv_swap.

      Is there a way to get the same info displayed above, but at the physical volume level, or at least all logical volumes? In the above example, Physical volume (sda2) consists of the following 3 logical volumes:

      1. lv_root 50 GB
      2. lv_home 221.46 GB
      3. lv_swap 25.55 GB

      How do I get used space of all of them?

      It's showing the 3.5TB drive fine.

      1 Reply Last reply Reply Quote 1
      • JaredBuschJ
        JaredBusch
        last edited by JaredBusch

        not sure what you are not seeing? I have a 127gb vhdx assigned to this VM and let CentOS setup it's own default partitioning.

        [root@relay01 ~]# df -hT
        Filesystem                      Type      Size  Used Avail Use% Mounted on
        /dev/mapper/centos_relay01-root xfs        50G  1.7G   49G   4% /
        devtmpfs                        devtmpfs  229M     0  229M   0% /dev
        tmpfs                           tmpfs     240M     0  240M   0% /dev/shm
        tmpfs                           tmpfs     240M  4.3M  235M   2% /run
        tmpfs                           tmpfs     240M     0  240M   0% /sys/fs/cgroup
        /dev/sda2                       xfs       497M  280M  218M  57% /boot
        /dev/sda1                       vfat      200M  9.5M  191M   5% /boot/efi
        /dev/mapper/centos_relay01-home xfs        76G   33M   76G   1% /home
        tmpfs                           tmpfs      48M     0   48M   0% /run/user/0
        

        Just add it all up. Or do you need/want a utility to show that sum?

        ObsolesceO 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          Are you sure that they are all mounted?

          1 Reply Last reply Reply Quote 0
          • ObsolesceO
            Obsolesce @JaredBusch
            last edited by

            @JaredBusch

            There's missing info. If I add it all up (the total space), I get like 55 GB. But that disk is 304.63 GB total. So I'm missing two logical volumes in there.

            scottalanmillerS 1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch
              last edited by JaredBusch

              CentOS 7 puts everything after 50GB into /home by default. Where did that go on your system?

              ObsolesceO 1 Reply Last reply Reply Quote 1
              • ObsolesceO
                Obsolesce @JaredBusch
                last edited by

                @JaredBusch said in Trying to get accurate disk usage info from CentOS:

                CentOS puts everything after 50GB into /home by default. Where did that go on your system?

                I have /home redirected to /media/DATA/home.

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Use lvs to get a view of volumes, rather than mounts.

                  1 Reply Last reply Reply Quote 2
                  • JaredBuschJ
                    JaredBusch
                    last edited by JaredBusch

                    There you go. You moved it.

                    Look at my text above. Yours is probably sitting right there

                    In a place like this, just not mounted. /dev/mapper/centos_relay01-home

                    1 Reply Last reply Reply Quote 2
                    • scottalanmillerS
                      scottalanmiller @Obsolesce
                      last edited by

                      @Tim_G said in Trying to get accurate disk usage info from CentOS:

                      @JaredBusch

                      There's missing info. If I add it all up (the total space), I get like 55 GB. But that disk is 304.63 GB total. So I'm missing two logical volumes in there.

                      Right, df is a view of mounted filesystems only, not of unmounted volumes or devices.

                      JaredBuschJ ObsolesceO 2 Replies Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @scottalanmiller
                        last edited by JaredBusch

                        @scottalanmiller said in Trying to get accurate disk usage info from CentOS:

                        @Tim_G said in Trying to get accurate disk usage info from CentOS:

                        @JaredBusch

                        There's missing info. If I add it all up (the total space), I get like 55 GB. But that disk is 304.63 GB total. So I'm missing two logical volumes in there.

                        Right, df is a view of mounted filesystems only, not of unmounted volumes or devices.

                        Right, and by default, when you let CentOS map the first drive with the defualt settings in the install wizards, you will get 50GB set to / and the rest dumped to /home.

                        So he built the system and it did that. Then he added the drive and redicted home. so the mount went away.

                        1 Reply Last reply Reply Quote 1
                        • ObsolesceO
                          Obsolesce @scottalanmiller
                          last edited by

                          @scottalanmiller said in Trying to get accurate disk usage info from CentOS:

                          @Tim_G said in Trying to get accurate disk usage info from CentOS:

                          @JaredBusch

                          There's missing info. If I add it all up (the total space), I get like 55 GB. But that disk is 304.63 GB total. So I'm missing two logical volumes in there.

                          Right, df is a view of mounted filesystems only, not of unmounted volumes or devices.

                          I see. That makes more sense now.

                          The problem now is that I have a spreadsheet, that says this:

                          0_1488909616286_Untitled.jpg

                          And I'm still not seeing the used 32.4 or so GB. According to my output in my OP, it's only using about 3.5 GB total (excluding the big drive).

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            You might have something mounted over top of something else.

                            1 Reply Last reply Reply Quote 1
                            • ObsolesceO
                              Obsolesce
                              last edited by

                              Okay yeah, I did some more digging and you all were right, it just simply wasn't mounted. The spreadsheet was not accurate.

                              So the system itself is only using 3.8 GB? it says "/" Didn't realize it was that small, so used to Windows.

                              scottalanmillerS BRRABillB 2 Replies Last reply Reply Quote 2
                              • scottalanmillerS
                                scottalanmiller @Obsolesce
                                last edited by

                                @Tim_G said in Trying to get accurate disk usage info from CentOS:

                                Okay yeah, I did some more digging and you all were right, it just simply wasn't mounted. The spreadsheet was not accurate.

                                So the system itself is only using 3.8 GB? it says "/" Didn't realize it was that small, so used to Windows.

                                Depending on what you split out, yeah. Can be quite tiny.

                                I just did a Fedora 25 install a few hours ago. Total size of / including everything (no splitting off) is 1.5GB. And Fedora is not considered light at all. That's with bloat like Cockpit installed! I could trim that down rather a bit if I was so inclined.

                                1 Reply Last reply Reply Quote 2
                                • BRRABillB
                                  BRRABill @Obsolesce
                                  last edited by

                                  @Tim_G said in Trying to get accurate disk usage info from CentOS:

                                  Didn't realize it was that small, so used to Windows.

                                  @scottalanmiller no comment on this? You are the KING!!! of comments when people say this.

                                  I know because it's been said to me numerous times! 🙂

                                  scottalanmillerS wirestyle22W 2 Replies Last reply Reply Quote 1
                                  • scottalanmillerS
                                    scottalanmiller @BRRABill
                                    last edited by

                                    @BRRABill said in Trying to get accurate disk usage info from CentOS:

                                    @Tim_G said in Trying to get accurate disk usage info from CentOS:

                                    Didn't realize it was that small, so used to Windows.

                                    @scottalanmiller no comment on this? You are the KING!!! of comments when people say this.

                                    I know because it's been said to me numerous times! 🙂

                                    He already knows 😉

                                    1 Reply Last reply Reply Quote 0
                                    • wirestyle22W
                                      wirestyle22 @BRRABill
                                      last edited by wirestyle22

                                      @BRRABill said in Trying to get accurate disk usage info from CentOS:

                                      @Tim_G said in Trying to get accurate disk usage info from CentOS:

                                      Didn't realize it was that small, so used to Windows.

                                      @scottalanmiller no comment on this? You are the KING!!! of comments when people say this.

                                      I know because it's been said to me numerous times! 🙂

                                      😄

                                      I just realized I know Scott's triggers pretty well at this point lol

                                      Reid CooperR 1 Reply Last reply Reply Quote 0
                                      • Reid CooperR
                                        Reid Cooper @wirestyle22
                                        last edited by

                                        @wirestyle22 said in Trying to get accurate disk usage info from CentOS:

                                        @BRRABill said in Trying to get accurate disk usage info from CentOS:

                                        @Tim_G said in Trying to get accurate disk usage info from CentOS:

                                        Didn't realize it was that small, so used to Windows.

                                        @scottalanmiller no comment on this? You are the KING!!! of comments when people say this.

                                        I know because it's been said to me numerous times! 🙂

                                        😄

                                        I just realized I know Scott's triggers pretty well at this point lol

                                        RAID 5!!!

                                        runs away

                                        1 Reply Last reply Reply Quote 3
                                        • dafyreD
                                          dafyre
                                          last edited by

                                          *stands close to @scottalanmiller , ready to pounce on him with an epipen, just in case*

                                          1 Reply Last reply Reply Quote 2
                                          • 1 / 1
                                          • First post
                                            Last post