Solved Trying to get accurate disk usage info from CentOS
-
Not sure what I'm missing...
I'm running the "df -hT" command to see the used disk space. This is what I get:
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:
- lv_root 50 GB
- lv_home 221.46 GB
- lv_swap 25.55 GB
How do I get used space of all of them?
It's showing the 3.5TB drive fine.
-
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?
-
Are you sure that they are all mounted?
-
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.
-
CentOS 7 puts everything after 50GB into /home by default. Where did that go on your system?
-
@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.
-
Use lvs to get a view of volumes, rather than mounts.
-
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
-
@Tim_G said in Trying to get accurate disk usage info from CentOS:
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.
-
@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:
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.
-
@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:
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:
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).
-
You might have something mounted over top of something else.
-
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.
-
@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.
-
@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!
-
@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
-
@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
-
@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
-
*stands close to @scottalanmiller , ready to pounce on him with an epipen, just in case*