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 installed 11.10 ~two weeks ago and run into some strange troubles recently.

Installation was on brand new laptop with clear 160GB SSD. I opted for encrypting home directory. Apart from that I accepted defaults during the installation. There is no other OS on my laptop.

I had circa 40GB in use when (for the third time) I got to see this very unpleasant window:

enter image description here

Twice situation was pretty bad and whole system slowed down considerably. After reboot I could not login to graphical interface (with an error message informing about insufficient space) and had to remove some files from command line first.

Third time I still managed to quickly delete some files and it helped.

My laptop is mainly work environment: so no torrents, games, just two movies. Only media filling space are ~20GB of pictures, and bunch of pdfs. Working mostly on PostgreSQL & PostGIS, GeoServer and QGIS recently.

Although I had lots of opportunities to test and practice my backups I would be extremely grateful if somebody could point me to any potential solutions to this problem.

My laptop has been bought just before I installed Ubuntu, and it came without OS. Could that be hardware issue?

Or is the encrypted home causing me headaches?

Thanks for help!


Update 1: As suggested by @maniat1k, here is current output of fdisk -l:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1   312581807   156290903+  ee  GPT

Update 2: As suggested by zanfur, output of df:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            149802648  31411456 110781576  23% /
udev                   1959764         4   1959760   1% /dev
tmpfs                   788276       992    787284   1% /run
none                      5120         0      5120   0% /run/lock
none                   1970684      2716   1967968   1% /run/shm
/dev/sda1                19363       129     19234   1% /boot/efi
/home/rdk/.Private   149802648  31411456 110781576  23% /home/rdk

And sudo parted -l:

Model: ATA INTEL SSDSA2BW16 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  20.0MB  20.0MB  fat16              boot
 2      20.0MB  156GB   156GB   ext4
 3      156GB   160GB   4177MB

Update 3:

Yet another window with low memory message :/

Working recently mostly on VirtualBox and using Remmina.

Following this information I deleted virtually everything from my home directory. Rebooted. There was ~20GB in use after that [~10GB for VirtualBox disk image which I wanted to keep if possible]. Following SarveshLad comment I was trying to recover more space and running Bleachbit application when I got another error of low space on HD. Then the system froze. How on earth can my Ubuntu fill up HD with over 100GB within minutes?

share|improve this question
2  
Have you actually checked if you still have remaining space in / –  Uri Herrera Oct 30 '11 at 19:54
1  
In Nautilus (the graphical file browser), or if you prefer from the command line, check what folders are big. In particular, see if anything outside of /home is big. You should report what you find by editing your question to include the new information. If you're using Nautilus for this and you cannot find where the space-consuming folders are, press Ctrl+H (or View > Show Hidden Files). –  Eliah Kagan Nov 19 '11 at 22:34
1  
Have you run a disk check (sudo e2fsck -f -a)? –  RolandiXor Nov 19 '11 at 23:18
1  
may be its the thumbnails for your huge collection of pic and pdf taking up space .... just a observation –  sarveshlad Nov 20 '11 at 0:18
1  
@radek on which ever partition you have ubuntu installed. –  RolandiXor Nov 20 '11 at 1:12

2 Answers 2

up vote 5 down vote accepted
+50

This is almost certainly due to being actually out of space on the root filesystem. If you have lots of free space on your drive, then you likely have a separate filesystem for your user data. This is a common setup.

To find the amount of free space on all your partitions, run the "disk free" command, df. You do not need to be root. You'll get something like the following:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              9614116   8382396   1134048  89% /
none                   1541244       284   1540960   1% /dev
none                   1546180      4804   1541376   1% /dev/shm
none                   1546180       372   1545808   1% /var/run
none                   1546180         0   1546180   0% /var/lock
none                   1546180         0   1546180   0% /lib/init/rw
none                   9614116   8382396   1134048  89% /var/lib/ureadahead/debugfs
/dev/sda3             32218292  12333212  19885080  39% /home

As you can see, I have a separate root filesystem (the first one listed) and user data filesystem (the last one listed), and my root partition is pretty close to full. If your df output shows you that your root filesystem is actually full, you need to delete some files (careful which ones!), or resize your partitions.

A useful terminal command for finding what's eating up all the space is the "disk usage" command, du. Invoked without any parameters, it starts listing the sizes of every file in the current directory, and in every directory below. More useful for tracking down usage is in your scenario is sudo du -s -h -x /*, which will give you the total amount of space used (-s) by each file or directory at the top of your root filesystem (/*), without looking at other filesystems (-x), in human-readable numbers like "124M" (-h). Don't worry if it takes a while to complete, it will take on the order of minutes the first run through.

Don't delete files without first knowing what they are, of course. But, in general, you won't break your system if you delete files in the following directories:

  • /tmp (user temp data -- these are commonly all deleted every reboot anyway)
  • /var/tmp (print spools, and other system temporary data)
  • /var/cache/* (this one can be dangerous, research first!)
  • /root (the root user's home directory)

In addition to the locations above, the following locations are common culprits:

  • /opt (many third-party apps install here, and don't clean up after themselves)
  • /var/log (log files can eat up a lot of space if there are repetitive errors)

So, check those first. If it turns out that things look correct and your root partition is simply too small, you'll need to resize your partitions to fit. There are a myriad of ways to do that, but likely the easiest is to boot from an Ubuntu LiveCD (get it from the Ubuntu site's download page) and run the GNOME partition editor gparted. You may have to install the gparted package first (from within the LiveCD environment, run sudo apt-get install gparted or use the software center). In any case, it is a graphical utility that will allow you to right-click on the partition and select "resize".

N.B. -- do not have any operating systems hibernated as you resize partitions, or it will either not work, or do terrible things to your hibernated OS.

share|improve this answer
    
kangarooo@WindowsOsXUNR100403LTS:~$ sudo du -s -h -x /∗ [1] 5700 du: cannot access `/home/kangarooo/.gvfs': Permission denied lowast: command not found kangarooo@WindowsOsXUNR100403LTS:~$ 4.6G / ^C [1]+ Exit 1 sudo du -s -h -x / –  Kangarooo Nov 21 '11 at 16:11
2  
I replaced the "∗" with a "*", this is what it was intended to be, I think... –  Marcel Stimberg Nov 21 '11 at 17:48
    
@zanfur: Thanks. Updated question following your recommendations. And experienced another low memory error message in the meantime. Is there anything else you would suggest doing? –  radek Nov 23 '11 at 0:55

According to your df listing, you have plenty of free space on /. After you get one of these messages, check df again and if it still shows plenty of free space, check the output of dmesg for errors. It is possible that you are getting an error that is causing the filesystem to be remounted read only, and that might be confusing the free space notifier. From the livecd, you should open the disk utility and check the drive's SMART status to make sure it doesn't have any bad sectors or anything. Running the long self test might be a good idea too, and checking the filesystem after that.

share|improve this answer
    
Thanks. Few questions. Anything in particular I should be looking for in dmesg? How exactly can I check SMART status? And how to perform long self test? –  radek Nov 23 '11 at 19:46

protected by Community Jan 11 at 1:54

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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