3.5 GB rootfs is full?


16 posts
by kghunt » Wed Jul 11, 2012 11:59 am
My rootfs is full but I have not installed much. I don't even use the gui it is headless. Any idea what could be filling it up. I deleted most of the log files.
Posts: 360
Joined: Sun Mar 04, 2012 9:28 am
by itimpi » Wed Jul 11, 2012 12:10 pm
How big is your SD card? If it is larger than 2GB, have you followed the steps for resizing the partitions to use the full card as described at http://elinux.org/RPi_Resize_Flash_Partitions
Posts: 1035
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
by Joe Schmoe » Wed Jul 11, 2012 12:18 pm
If it really is 3.5GB, then this is probably *not* a "failure to enlarge" problem.

AFAIK, all the distributed distros are setup as a 2G image. So, if it really is 3.5, then the OP must have already enlarged.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2854
Joined: Sun Jan 15, 2012 1:11 pm
by kghunt » Wed Jul 11, 2012 12:24 pm
Yes I enlarged my root partition in gparted before I first booted the Pi. I removed a load of packages and deleted some logs. I rebooted and not it is reporting 1.3 GB free? It didn't seem to update automatically until I rebooted.
Posts: 360
Joined: Sun Mar 04, 2012 9:28 am
by Mortimer » Wed Jul 11, 2012 12:31 pm
I wonder if this is the same thing I am seeing. I posted a similar issue with a new 4GB card I loaded with Wheezy yesterday.

viewtopic.php?f=50&t=8071&start=375#p120831
User avatar
Posts: 719
Joined: Sun Jun 10, 2012 3:57 pm
by Alec » Wed Jul 11, 2012 12:52 pm
Might this be related to an absence of garbage collection on the SD card? (A la TRIM, as per: http://en.wikipedia.org/wiki/TRIM )
Posts: 22
Joined: Sat Jan 14, 2012 8:18 pm
by jojopi » Wed Jul 11, 2012 1:34 pm
kghunt wrote:Yes I enlarged my root partition in gparted before I first booted the Pi. I removed a load of packages and deleted some logs. I rebooted and not it is reporting 1.3 GB free? It didn't seem to update automatically until I rebooted.
If you delete a file that is currently in use, then the space will not be freed until all processes have closed it. So if you delete a large log file you may need to restart rsyslogd. Or if you have upgraded or removed packages you may need to restart or kill the relevant applications. A log file can even continue to grow after it has been deleted, if something is still writing to it.
User avatar
Posts: 2122
Joined: Tue Oct 11, 2011 8:38 pm
by jamesh » Wed Jul 11, 2012 1:43 pm
Can you find out where all the space is being used? Not sure how to do it on the command line, some sort of disk usage analyser?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by asb » Wed Jul 11, 2012 1:47 pm
jamesh wrote:Can you find out where all the space is being used? Not sure how to do it on the command line, some sort of disk usage analyser?


ncdu is your friend here.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 799
Joined: Fri Sep 16, 2011 7:16 pm
by jojopi » Wed Jul 11, 2012 2:04 pm
asb wrote:ncdu is your friend here.
This does not appear to be able to detect files with no remaining links.
User avatar
Posts: 2122
Joined: Tue Oct 11, 2011 8:38 pm
by asb » Wed Jul 11, 2012 2:10 pm
jojopi wrote:
asb wrote:ncdu is your friend here.
This does not appear to be able to detect files with no remaining links.


That's right, it won't help with the problem you answered, where you delete a large log file but it is still taking up space as the handle is still open.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 799
Joined: Fri Sep 16, 2011 7:16 pm
by jamesh » Wed Jul 11, 2012 3:12 pm
Does a reboot close all the outstanding handles?
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by asb » Wed Jul 11, 2012 3:29 pm
jamesh wrote:Does a reboot close all the outstanding handles?


Yep.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 799
Joined: Fri Sep 16, 2011 7:16 pm
by felixfurtak » Thu Jul 12, 2012 11:18 am
what is the output from :-

df -h ?

you could clear some space easily using

sudo apt-get clean
Posts: 47
Joined: Wed Nov 16, 2011 10:41 am
by Killerbee » Thu Jul 12, 2012 3:19 pm
FYI

I can remember I had this PB as well. I used another linux box to check the SD card file system. I used gparted. Gparted showed me that my 4GB card was full and completely "used" :cry: I run the "check fs option" for my SD card and suddenly 2GB was free. :)
Posts: 62
Joined: Tue Sep 20, 2011 6:38 pm
by The_Klint » Sun Nov 09, 2014 10:36 pm
Hello,

This is my first post here, but recently I´d the same problem and I think it could be similiar reason to yours.
Have you installed some client as Transmission daemon or similar? If yes, the reason could be a problem with a startup without disk mounted yet.
In other words, try to see if there are some files in /mnt folder as root user:

1. login to pi
2. unmount all your devices as PI: sudo umount -a
3. set super user: sudo -s
4. go to your mnt folder: cd /mnt
5. see what files are in there and not supposed to be there.
6. Delete them rm rmdir

Sorry about my english explanation, and I hope it´ll be usefull for someone.

Regards. Juan,
Posts: 3
Joined: Sun Nov 09, 2014 10:26 pm