[SOLVED] df -h and Disk Usage Analyzer different values

Kernels & Hardware, configuring network, installing services

[SOLVED] df -h and Disk Usage Analyzer different values

Postby 4joeyirosh1 » 2020-07-26 08:43

Hi!I have Debian Buster 10.4 installed on my machine.

Yesterday,when I checked my / mount point using df -h command it showed value of 14.2 GB used which tallied with the value of Disk Usage Analyzer.

I moved about 6.8 GB of data between partitions and now if I check the current value of df -h its showing / has risen by 6.8 GB while Disk Usage Analyzer shows the old value of 14.2 GB.This 6.8 GB of data was not moved to tha same disk partition where / resides (it was moved to /home on different partition)so I am wondering why / increased by 6.8 GB and why the difference between df -h and Disk Usage Analyzer.Please see discrepancy below between df -h and Disk Usage Analyzer


Code: Select all
# df -h
Filesystem                     Size  Used Avail Use% Mounted on
udev                           7.8G     0  7.8G   0% /dev
tmpfs                          1.6G  9.7M  1.6G   1% /run
/dev/sda1                       30G   21G  6.6G  77% /

Image

I would like to clear the 6.8 GB contents on / so that it doesnt get full and revert it to its old 14.2 GB size.I cannot find the files that are in /home that could be in / so that I delete the same files in / mount point
Last edited by 4joeyirosh1 on 2020-07-26 11:15, edited 1 time in total.
4joeyirosh1
 
Posts: 94
Joined: 2016-09-11 18:04

Re: df -h and Disk Usage Analyzer showing different values

Postby LE_746F6D617A7A69 » 2020-07-26 09:56

First of all, df -h shows the size in Gibibytes, while Disk Usage Analyser uses Gigabytes - use df -hH to get comparable units.

But, the difference is too big to be just an effect of using different units.

Have You moved or copied the data?
Was the /home partition mounted when You have checked the size? -> can You show a *full* output of df -hH ?
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 280
Joined: 2020-05-03 14:16

Re: df -h and Disk Usage Analyzer showing different values

Postby p.H » 2020-07-26 10:30

LE_746F6D617A7A69 wrote:use df -hH

df -H is enough.

Possible causes for missing disk space include :
- filesystem inconsistency
- files deleted but still opened
- files hidden under a mount point
- files in a location the user does not have permission to read.
p.H
 
Posts: 1422
Joined: 2017-09-17 07:12

Re: df -h and Disk Usage Analyzer showing different values

Postby 4joeyirosh1 » 2020-07-26 11:12

p.H wrote:
LE_746F6D617A7A69 wrote:use df -hH

df -H is enough.

Possible causes for missing disk space include :
- filesystem inconsistency
- files deleted but still opened
- files hidden under a mount point
- files in a location the user does not have permission to read.

Ok,I noticed what I did pH.Not sure if anyone will understand my explanation but I have solved the issue with this approach.Recall you aided me in my prior post http://forums.debian.net/viewtopic.php?f=5&t=146855 I created a home2 directory on sda2 and copied my files from home directory on sda6 since I couldnt have 2 home directories thus created a temporary home2 on /sda2 to copy contents.Once I formatted sda6 as linux-swap I decided to create now a home directory and copied contents of home2 to home not realizing when I did mkdir home to create the home folder it created it on /.Once I copied data to home,I edited fstab to have mountpoint /home on sda2 and when I start the machine,the /home seen is on sda2 yet there was still home folder with all the contents on home under / mountpoint.Its this home under / mountpoint that was creating the extra disk usage on /.

So what I did is that I edited fstab to ensure the /home under /sda2 isnt mounted at next boot hence revealing the home folder under / mountpoint and I proceeded to delete all contents of this home and restored fstab so that at next boot the correct /home under /sda2 and / without the redundant home folder were mounted and my / disk usage went back to 14.2 GB
4joeyirosh1
 
Posts: 94
Joined: 2016-09-11 18:04


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable