Madlax
Posts: 10
Joined: Fri Mar 07, 2014 11:12 pm

Rootfs and /dev/root full

Fri Mar 07, 2014 11:20 pm

Hi everyone!

I'm quite a noob with linux and I'm now in front of an unsolvable issue.

My raspbian is currently saying that rootfs and /dev/root is full :

Code: Select all

 $ df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
rootfs            13G   13G     0 100% /
/dev/root         13G   13G     0 100% /
devtmpfs         211M     0  211M   0% /dev
tmpfs             44M  372K   44M   1% /run
tmpfs            5,0M     0  5,0M   0% /run/lock
tmpfs             88M     0   88M   0% /run/shm
/dev/mmcblk0p5    60M   19M   41M  32% /boot
tmpfs             88M  4,0K   88M   1% /tmp
I don't know how to fix it, I try fsck at the restart (sudo touch /forcefsck) and delete all trash, apt-get clean, purge...

Please help me if you have any idea!

Thank a lot for your help :D

Madlax.

User avatar
rpdom
Posts: 20017
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 4:48 am

I wonder what is using up all that space???

Try

Code: Select all

sudo du -xh / | grep -P "G\t"
to look for files/directories that are using a lot of space on the card.

Madlax
Posts: 10
Joined: Fri Mar 07, 2014 11:12 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 7:26 am

Hi,

thanks for your help.

Here's the result:

Code: Select all

 $ sudo du -xh / | grep -P "G\t"
1,5G    /usr
2,1G    /

User avatar
jojopi
Posts: 3616
Joined: Tue Oct 11, 2011 8:38 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 8:19 am

So the problem data are not visible. You have rebooted, which rules out deleted files that are still held open. You have forced fsck, which means the bitmaps must be accurate.

That only really leaves files that are hidden underneath other mount points. /tmp is by far the most likely, since the init scripts only mount it as a separate tmpfs when the root is too full.

"sudo umount /tmp", and then look in /tmp.

Madlax
Posts: 10
Joined: Fri Mar 07, 2014 11:12 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 10:26 am

Hi,

This is what I have is /tmp

Code: Select all

/tmp $ ls -Al
total 0
-rw-r--r-- 1 root root 0 mars   8 10:19 .clean
Can I delete it without any issue?

Thanks again for your help :D

Mad.

User avatar
jojopi
Posts: 3616
Joined: Tue Oct 11, 2011 8:38 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 5:04 pm

Actually I was wrong; /tmp is the least likely directory to be the problem because the init scripts empty it before mounting the tmpfs on top.

Still, df reports 13G and du reports 2,1G, so there is at least 10G of data hidden somewhere. Let us try bind-mounting / in a different place, so that none of it is overlaid by other mounts, and running an interactive disk usage program:

Code: Select all

sudo mount --bind / /mnt
sudo ncdu -x /mnt
The biggest directories would normally be something like:

Code: Select all

--- /mnt -----------------------------------------------------------------------
    1,5GiB [##########] /usr                                                    
  641,3MiB [####      ] /var
  457,1MiB [###       ] /opt
  122,2MiB [          ] /home
Does this find the extra 10G in your case? If so you can navigate into the subdirectories to find the actual file(s).

Madlax
Posts: 10
Joined: Fri Mar 07, 2014 11:12 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 5:22 pm

Yes it definitely found it!

Code: Select all

10,4GiB [##########] /media
1,4GiB [#         ] /usr
279,8MiB [          ] /var
However, when I search for the file in the /media folder, I don't find anything:

Code: Select all

/media $ sudo du -ah
4,0K    ./USBHDD1/torrents/watch
8,0K    ./USBHDD1/torrents/savetorrents/tmpwcexmR.torrent
12K     ./USBHDD1/torrents/savetorrents
88M     ./USBHDD1/torrents/downloading/A.Legal.TV.Show.mp4 ;)
88M     ./USBHDD1/torrents/downloading
88M     ./USBHDD1/torrents
88M     ./USBHDD1
4,0K    ./SETTINGS
88M     .
We are quite close to the answer, thank you!!

PS: Sorry if there is some mistakes in my English, I'm not a native speaker.

User avatar
jojopi
Posts: 3616
Joined: Tue Oct 11, 2011 8:38 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 5:56 pm

It seems the files are in /media/USBHDD1 on the SD card, but the USB drive is mounted on the same directory, hiding them. This could happen if the torrent client started before the drive mounted.

With the bind-mount in place, look in /mnt/media, and consider moving files from /mnt/media/USBHDD1 (SD card) to /media/USBHDD1 (USB).

Madlax
Posts: 10
Joined: Fri Mar 07, 2014 11:12 pm

Re: Rootfs and /dev/root full

Sat Mar 08, 2014 9:25 pm

Did it!

Thank you so much for your help, it was exactly what you said!

I delete all the file /mnt/media/USBHDD1 and rootfs come back at 17% used.

I now have to change Deluge starts in crontab to avoid it to start before the mount of the USB HDD.

Again, thank you very much!!

Mad.

nusskati87
Posts: 2
Joined: Mon Mar 17, 2014 12:52 pm

Re: Rootfs and /dev/root full

Mon Mar 17, 2014 1:10 pm

Hi,

ich have the same problem. Until yesterday everthing worked fine. Then, i got this

Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 2595624 2595056 0 100% /
/dev/root 2595624 2595056 0 100% /
devtmpfs 216108 0 216108 0% /dev
tmpfs 44876 940 43936 3% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 89740 0 89740 0% /run/shm
/dev/mmcblk0p5 57288 18536 38752 33% /boot
/dev/sdb1 1953511420 417811484 1535699936 22% /media/externe
/dev/root 2595624 2595056 0 100% /mnt

I looked for large, new created files but could not find them. I never had this problem before. I reseted my SD card and thought, the problem was "solved". The hole day i just hat 74% utilization as it should be. This morning the 100% were back again.
apt-get clean did not work.

I think that something is wrong with my crontab. I have two HHDs. One for working and the other one for backup every night. Here is my crontab:
0 1 * * * sudo mount /dev/sda1
0 7 * * * sudo umount /dev/sda1

3 1 * * * sudo rsync -arvuP --delete /media/externe/ /media/externeII/
2 1 * * * sudo rsync -arvuP --delete ~/usefull_commands /media/externe

All commands go well. I just checked they one by one. The mounting points are set correctly

How can i solve this problem and avoid it in future. Thanks for your help in advance!!

Sending my very best regards,

hendrik

nusskati87
Posts: 2
Joined: Mon Mar 17, 2014 12:52 pm

Re: Rootfs and /dev/root full

Mon Mar 17, 2014 2:17 pm

Here is some more information:


1.2GiB [##########] /usr
768.1MiB [###### ] /media
209.4MiB [# ] /var
167.7MiB [# ] /home


under /user

648.7MiB [##########] /share
450.3MiB [###### ] /lib
116.9MiB [# ] /bin


under /share

/..
170.9MiB [##########] /icons
148.0MiB [######## ] /locale
71.5MiB [#### ] /doc
47.3MiB [## ] /scratch
35.1MiB [## ] /fonts
19.8MiB [# ] /perl
18.0MiB [# ] /man

and under /icons just old stuff:

drwxr-xr-x 9 root root 4096 Jun 19 2013 .
drwxr-xr-x 158 root root 4096 Aug 14 2013 ..
drwxr-xr-x 3 root root 4096 Jun 19 2013 Adwaita
drwxr-xr-x 9 root root 4096 Jun 19 2013 HighContrast
drwxr-xr-x 3 root root 4096 Jun 19 2013 HighContrastInverse
drwxr-xr-x 3 root root 4096 Jun 19 2013 LowContrast
drwxr-xr-x 10 root root 4096 Nov 15 10:42 gnome
drwxr-xr-x 15 root root 4096 Nov 15 10:43 hicolor
drwxr-xr-x 13 root root 4096 Jun 19 2013 nuoveXT2


using sudo du -ah:

1.9M ./hicolor
171M .

Return to “Raspberry Pi OS”