4

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
Jiew Meng
  • 10,677

5 Answers5

4

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 :)

Lucio
  • 19,191
  • 32
  • 112
  • 191
1

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.

joncam
  • 179
1

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.

lgarzo
  • 20,492
0

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.

Flimm
  • 44,031
-1

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)

nanofarad
  • 20,906