Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Just today, my Ubuntu 11.04 started prompting me that my HDD is full ... I know I am filling up my HDD fast, but its the storage partition I expect to be filling up not my 60+GB OS Partition. So I did a Disk Usage Analysis and got the below:

enter image description here

enter image description here

enter image description here

/labs is actually the Storage partition

First, my home folder /home/jiewmeng is said to use 58.8GB? but the biggest few files, don't appear to sum up to that? Counting quickly, it looks like ~1.5GB only?

Looking at the 2nd image, my HDD doesn't seem to be all that full at all? Is it a mistake?

UPDATE (df -Th output)

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext4     68G   65G  4.0K 100% /
none      devtmpfs    3.9G  680K  3.9G   1% /dev
none         tmpfs    3.9G  220K  3.9G   1% /dev/shm
none         tmpfs    3.9G  392K  3.9G   1% /var/run
none         tmpfs    3.9G     0  3.9G   0% /var/lock
/dev/sda2     ext4    764G  561G  165G  78% /labs
/dev/sda3     ext4     69G  180M   65G   1% /ex
share|improve this question
    
Please also provide the output of df -i. It shows inode information. You may be running out of inodes in case you created lots of small files/directories. –  gertvdijk Nov 14 '12 at 10:10
    
I had a similar problem with Ubuntu 12.10. See My Question for further information. –  Lucio Nov 30 '12 at 17:28
add comment

5 Answers 5

up vote 1 down vote accepted

Run df -h in a terminal window. The output should have the proper numbers.

/dev/sda2              16G  5,1G   10G  34% /
udev                  2,0G  4,0K  2,0G   1% /dev
tmpfs                 807M  896K  806M   1% /run
none                  5,0M  8,0K  5,0M   1% /run/lock
none                  2,0G  224K  2,0G   1% /run/shm
/dev/sda6              28G   14G   14G  51% /home

In my example the /home filesystem is located on /dev/sda6 and has 14GB used (3rd column) and 14GB free space (4th).

You can check the total disk usage of a directory by using du -hs. E.g:

$ du -hs /home/username
14G /home/username

You may have hidden directories accumulating large files. The first yellow block in the gparted window shows that the root partition (/dev/sda1) is almost full.

share|improve this answer
    
See update for df -Th output, it says /dev/sda is full too. I noticed I am using a 1TB drive (931GB according to GParted) but Ubuntu says / is 624GB and thats 100%? maybe its not full but Ubuntu thinks its full? –  Jiew Meng Oct 19 '11 at 13:38
    
Your output says that /dev/sda1 is full (use 100%). Ubuntu refers to this partition when it reports that it is full. You have additional partitions on /dev/sda besides /dev/sda1. The full size is the sum of the sizes of each partition. sda1 + sda2 + sda3 + sda4. –  lgarzo Oct 19 '11 at 13:44
    
So even if /dev/sda1 is full, how is it full looking at the output from Disk Usage Analyzer? I think the main oddity is that my home folder. Its taking up 58GB when the 1st few biggest files add up to ~1.5GB? –  Jiew Meng Oct 19 '11 at 14:01
    
I see, that it can be a bit misleading that the first 2 screens display the size of /dev/sda and yes, since there is free space in sda2 and sda3, so there is in /dev/sda. But practically your system partition is /dev/sda1 and you do not want it to be full. –  lgarzo Oct 19 '11 at 14:06
1  
Oh I identified the problem ... with ls -lah actually ... -rw------- 1 jiewmeng jiewmeng 58G 2011-10-19 20:38 .xsession-errors.old can that be deleted? –  Jiew Meng Oct 19 '11 at 14:36
show 4 more comments

You could delete the .xsession-errors.old file entering sudo rm ~/.xsession-errors.old in terminal.

This file was the 99% of my drive space :)

share|improve this answer
    
@Jiew You should mark this answer as accepted according to your comment. –  Lucio Feb 25 '13 at 1:43
add comment

You should also check to make sure your .xsession-errors (not -old) is not growing quickly; this happens not infrequently.

I have set a cron job to delete it on a daily basis by making a cron file:

crontab -e

and putting this line in:

0 0 * * * rm /PATH-TO-HOME/.xsession-errors

(replacing PATH-TO-HOME with home/jiewmeng in this case )

There are a few other ways to prevent this (note that both of these methods disable logging, so if you're having any other oddities with your GUI, you may also lose useful logging info)

.xsession-errors file is huge. How can I disable?

modifies /etc/X11/Xsession to point the error logging to /dev/null

and http://ubuntuforums.org/showthread.php?t=1517991 simply removes the file and recreates it as a symlink to /dev/null.

share|improve this answer
add comment

Chances are if the first few files don't add up, the disk analyzer is missing something, the filesystem is corrupt, or you have several hundred thousand 10mb files in there somewhere.

try: - running fdisk

  • looking manually into the folder with high usage and checking how many files there are.

  • using a different usage analyzer that could show the hidden files or those with a bad entry in directory listings(try Jdiskreport)

share|improve this answer
1  
Fdisk lists partitions. It will be of little help. –  hexafraction Aug 16 '12 at 12:34
add comment

First of all, 1 GB is 1,000,000,000 bytes, and 1 GiB is 1,073,741,824 bytes. You need to realise this when comparing number from Disk Usage Analyser and GParted, as they use different units. df uses the units G, M and K to mean GiB, MiB and KiB respectively. If you want to use multiple of ten units, pass --si to df.

Now on to your questions.


My home folder /home/jiewmeng is said to use 58.8GB? but the biggest few files, don't appear to sum up to that? Counting quickly, it looks like ~1.5GB only?

The output of Disk Usage Analyser only shows directories. If your home directory is full of very large files, that will be included in the usage number of the home directory, but those large files won't get separate rows in the displayed table. This is probably what is happening in your case.


Looking at the 2nd image, my HDD doesn't seem to be all that full at all? Is it a mistake?

You have three partitions on your hard drive (not counting the swap partition), as shown by GParted. Your home directory is included in the partition /dev/sda1 mounted at /, since it isn't in its own partition. /dev/sda1 only has 3.45 GiB free space. Some of this free space (5%) is reserved for the root user by default. If you subtract that, you get what is known as the "available space", which is 4KiB according to the output of df. To double-check, run System Monitor and open the File Systems tab, you'll be able to compare the free space and the available space of each partition at once.

So, yes, the first partition is very full.


If I were you, I would boot a live CD of Ubuntu, make a backup of my data, shrink the /dev/sda2 partition, and grow the /dev/sda1 partition using GParted.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.