Today when I tried to start my Raspberry Pi I found one warning saying not enough room in the file system. Then I used df to see the storage, it showed:

Filesystem  1K-blocks   used   available use%  Mounted on
rootfs      6767168    6401028    0      100%   /
/dev/root   6767168    6401028    0      100%   /

Then I used sudo du -s -h -x /*to see the specific storage, it shows, (not complete, I only picked the large ones.)

1.3G  /home
2.9G  /usr
1.2G  /var

I want to delete some files on my SD card so I used Ubuntu to read the SD card. It shows four folders: 'boot','SETTINGS','root','data' in Files. When I checked the properties of 'root', it has 6.9G in total, 2.6G used and 4.0 free. Then I checked the /root/home folder, it only takes 67 MB. The /root/var takes 106MB and /root/usr takes 1.5G.

It does not match the space I get using the command above, why is that? And the 'root' folder has 4.0G free space, why does it use 100% ?

The usage of the other three folders:

name used free 'boot' 14.9MB 47MB 'SEETINGS' 406.5kB 25.5MB 'data' 418kB 474MB

  • Did you expand the filesystem? What size is the card? Can you add the output from df -h to your question as well. Apr 1 '16 at 14:41
  • I got this card from others so I do not know whether it has been expanded, how can I check? it's 16GB.
    – Tancredi
    Apr 1 '16 at 14:44
  • You've transcribed this ubuntu information from somewhere because you appear to have misspelled SETTINGS -- where is this information coming from? Isn't this really then a question about using Ubuntu? Beyond that, the du output corroborates the df output. You've filled the root partition.
    – goldilocks
    Apr 1 '16 at 14:46
  • run sudo raspi-config and choose the first option expand filesystem follow the prompts then reboot when it reboots run df -h and see how much free space you have. Apr 1 '16 at 14:46
  • I run this command and it tells me 'your partition layout is not currently supported by this tool. you are probably using NOOBS, in which case your root filesystem is already expanded anyway'. Does it mean it has been expanded before?
    – Tancredi
    Apr 1 '16 at 15:09


sudo raspi-config 

And then select the first option, the Expand Filesystem option, then reboot.

  • I run this command and it says 'your partition layout is not currently supported by this tool. you are probably using NOOBS, in which case your root filesystem is already expanded anyway'. What should I do then?
    – Tancredi
    Apr 1 '16 at 16:23

Well this looks like you have a "full" filesystem except for the "reserved" blocks. Those blocks are usable only for root (or process run by root) and prevent everything from stopping if you ever full the filesystem...

From the info you paste you have 366140 which is the default 5% blocks reserved... And would amount to ~350MB, this is one of the reason everything doesn't exactly adds up.

You can check the amount of reserved block with:

tune2fs -l /dev/mmcblk0p2

Check the line "Reserved block count"

You have this issue on a large "data" partition? man tune2fs on how to change this

  • This is not a long term solution. Apr 2 '16 at 2:50
  • 1
    Your solution is a very bad idea, perhaps you could include a different way of approaching the problem?
    – Darth Vader
    Apr 2 '16 at 11:39
  • You didn't asked for a solution... You asked for why it's not adding up while I believe it is adding up. I edited my answer anyway to provide different guideline
    – ROunofF
    Apr 4 '16 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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