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.

I have only one disk in my computer, a 80 GB SSD. It is formatted as a single ext4 partition (no swap), and all the usual folders are installed on it (I keep lots of data on external media, but /home and all the rest is on the SSD).

Today I booted it and I got a message that the drive is full. I opened Disk Usage Analyzer to look at what takes up space. It insists that 67.8 GB of the disk are used, and that / is taking up 36.4 GB. Which leads to the question, where are the missing 30 GB, if not on the file system?!

Just to have a comparison, I added up all the sizes of all readable folders listed in Nautilus as subfolders of / (including the hidden ones). I got 20.9 GB. Trash was unreadable, but I know it has 16.2 GB, so the sum is 36.1 GB, around the same as what Disk Usage Analyzer is reporting. There were some system folders which were unreadable, like proc, but I doubt that they add up to 30 GB - else it wouldn't be possible to install Ubuntu on small disks, and I've seen it run on 2.5 GB. I think they must be the 0.3 GB difference between my calculation and the Disk Usage Analyzer's report.

So I'd like to know, what is eating up these 30 GB and how do I get it to free them?

alt text

Edit with answers to CYREX's questions

  1. Booted from Ubuntu 10.10 64 bit live CD (same as my system).

fsck result:

root@ubuntu:~# fsck /dev/sda1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sda1: clean, 265956/4890624 files, 18073343/19537408 blocks
  1. Booted from the SDD. Emptied the trash, and the 16 GB from there are now free. The 30 GB are still missing.

alt text

  1. I am not experienced enough to know what counts as weird in a log. Here are my messages log and my syslog since last boot, maybe you can find something in them:

http://pastebin.com/FHrrV1rR http://pastebin.com/FK8TmZbc

  1. Here it got really strange. I plugged in an external 500 GB HDD. Disk Usage Analyzer overreported the available space, then showed space missing (76 GB used, but only 24 in folders).

alt text

Booted again from the LiveCD, started the Disk Usage Analyzer from it and got the same results as from the installed Ubuntu, within 1-2 GB.

Edit with answer to CodeMonk

That would have been a nice solution, but the partition is really 80 GB - I mean 74 GB + marketing "error", anyway the whole disk is formatted. It also shows that over 50 GB are used - so where are the 30 GB if not in files and folders? alt text GParted also reports the correct size of the external HDD. alt text

share|improve this question
    
Sometimes is best to not trust on GUI tools, open a terminal and run, get a summarized report of used space per dir on the root: sudo du -sm /* –  João Pinto Dec 15 '10 at 10:42
1  
By not expanding the Disk Usage Analyzer entry for / in your first and second screenshots, you've blinded yourself (and us) to the sizes of all the subordinate directories which the ring chart clearly shows as being occupied by something. It could be something as simple as /var/log/syslog being filled with some hugely complaining hardware, but we need that data. –  msw Dec 15 '10 at 13:00

5 Answers 5

up vote 7 down vote accepted

I solved it - thanks to all your advice, especially that of Javier Riveira, who suggested running Disk Analyzer with sudo rights (I didn't know this can have influence on the results).

I have Crashplan, and it is making backups to some of the external drives. So there is a backup set which goes to Milly, and another one which goes to Sto_Lat, once every 15 minutes (these are the names of the external drives). When I have at some point started the computer without these drives, Crashplan has found no folders under /media/Milly and /media/Sto_Lat, so it has just created them and has written backups to them.

For some reason, Disk Analyzer does not show these folders when started without sudo. Nautilus shows them, but lists the size of /media at 16 KB, when it is actually 30 GB.

I only noticed this when I dismounted all external drives, including Milly and Sto_Lat, and started gksudo baobab. Then I saw my external drives where there should be none - but not all of them but only the backup targets - and realised that these are not mounted drives, but eponymous folders created by Crashplan. There must be something weird going on when I mount the drive at the same name as the existing folder, I wonder why I don't get an error message or something...

BTW, this also solves why Disk Analyzer shows the sizes of Milly at 530 GB instead of 500 GB - these are the "missing" 30 GB, it counts the folder and the real drive together.

Now I only need a way to delete the folders without breaking Crashplan or remaining without backups.

share|improve this answer
    
You should mark this as the accepted answer, I've added a link to Javier's answer so he can get upvotes for the tip. –  Jorge Castro Dec 15 '10 at 21:17
    
This is exactly the same problem I had. One of my backup disks had died but my backup script still attempted to backup to the /mnt/Backup-Drive folder, filling up my root disk. –  Teh Aug 31 '13 at 16:51

If you use Disk Analyzer as a normal user there can be some files that you can't access or see. You can try to start it with superuser privileges. Open a terminal, or hit ALT+F2 and enter:

gksudo baobab

Baobab is the geeky name of the Disk Analyzer if you are wondering. Maybe it can now show you where are those lost megabytes.

share|improve this answer
    
Thank you, that helped solve the mystery! –  rumtscho Dec 15 '10 at 20:56

I really don't know if this helps you, but in my case I also experienced that, my HDD was loosing free space over time without a reason. It turned out that the default settings in synaptic package manager was also a contributor to that. The default settings in the preferences, under the file tab will instruct synaptic to keep all downloaded packages in the cache. Over the time that can accumulate a nice mountain of files. I changed the settings to delete downloaded packages after installation. That helped to recover quite a nice amount of free space.

Again I'm really not sure if that helps in your case, but you might check the synaptic cache, maybe that's full with files that are obsolete.

share|improve this answer
1  
interesting to know, but this cache would be counted as part of the filesystem. –  rumtscho Dec 15 '10 at 20:55

You can use the Disk Usage Analyzer to scan your directories and see where your space is going on the filesystem.

alt text

As for not being able to see 30GB of your disk, open up GParted and see how the space is allocated on the disk. It may be that your partition scheme isn't what you thought it was.

GParted

share|improve this answer
    
GParted was a good idea, but the mystery remains, see screenshot –  rumtscho Dec 15 '10 at 1:01
    
That is very strange indeed. Does the disk usage analyzer show any large files in the root dir? –  Nick Pascucci Dec 15 '10 at 3:25

Do the following at let me know how it went:

  1. Insert a LiveCd and fsck your /dev/sda1
  2. Clean your Trash Can.
  3. See the Log File Viewer for weird stuff that is happening.
  4. Test (If you can) with a normal HDD (Not SSD). Just to remove that option.

Let me know how it went.

share|improve this answer
    
Posted the info you requested, see edit in the question. –  rumtscho Dec 15 '10 at 1:01

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.