Calculating the actual size of a drive
Hello there.
I was setting up a new disk for my backups and noticed that my main drive /dev/sdb1/ is faulty reporting around 100gb more than what i expect it to be.
Prior i have been doing some tweaking, like setting jailed shelled for the users. Installing mod_ruid2 and some smaller stuff.
My /home directory is 68GB, and /backup is 70GB (On a seperate drive (sda)), 100GB for cpanel and server configs sounds excessive.
Running
du -hd1 / --exclude=/proc --exclude=/sys --exclude=/home/virtfs, which should exlude the mentioned directories, plus sda where the backups are located gives me the following output.
So my question is then: How do i go about showing the actual diskspace availably of sdb1 in WHM without needing to ssh in and running that command? (which im not entierly sure if its reporting right as i have no clue what 78GB at / is pointing to. I am not able to find any files close to 78GB at /, assuming it meaning every files under /, including /home ++++, but frankly i'm quite unsure at this point)
I also have neofetch (mandetory) which quicly reports the drive spaces, but that is also suffering from the same issue as WHM, whick makes me belive it not actually a false report, and there is something hogging my disk
Best regards, Jay
-
What does:
df -h
report as usage on the drive? Your "du" command reports 49G used on my machine and for the mountpoint "/", df reports 50G used - so that's close enough for me.
The ending of the "du" command (78G in your screen shot) will consist of all the items not excluded - so that 78G includes 5.8G of /usr, /5.7G of /var, 66G of of /home etc...
I'm guessing the WHM interface and neofetch are both including the "space" taken up by VirtFS to provide the Jailed Shell environment (if I don't exclude /home/virtfs from "du" - i.e. "du -hxd1 / --exclude=/proc --exclude=/sys", the usage jumps up from 49G to 190G). Does include VirtFS corresponds to the "missing amount"?
It is also possible that if the drive is failing, it could also be misreporting data.
0 -
Hello rbairwell!
Thanks for you reply.
df -h on the drive in question outputs the same as WHM.
/dev/sdb1 226G 167G 50G 78% /
Alright so the ending of the "du" command with the excludes results in the "real" disk usage of the entire root dir( /). Thanks alot!
The wierd thing is if i run du on the /home/virtfs it responds with a whopping 287GB, which doesnt make sense to me.[root@server2 ~]# du -sh /home/virtfs/
287G /home/virtfs/
I really wanna ditch virtfs for cagedfs and CL, but not until ive figured this headscratcher out :P
Anyway I could test the drives, like a memtest? It is a cloud server at hetzner, and does not have a dedicated drive.0
Please sign in to leave a comment.
Comments
2 comments