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:
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?
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: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 issudo 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 thegparted
package first (from within the LiveCD environment, runsudo 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.
According to your
df
listing, you have plenty of free space on /. After you get one of these messages, checkdf
again and if it still shows plenty of free space, check the output ofdmesg
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.