djtaz
Posts: 6
Joined: Wed Apr 27, 2016 10:37 am

/dev/root is at 100%

Mon Jul 15, 2019 10:42 am

Hi Guys ,

I'm having a very strange problem. Initially i thought it was just reporting incorrectly , but now i see things like couchpotato crashing because it says there isnt enough space. df -a shows me its 99% in use , but i cant find any large files that would cause it !
The part im worried about is : /dev/root 28G 26G 438M 99% / as the others dont seem to add up.

I did read somewhere that the USB being mounted may be causing it, but im wondering if anyone has any ideas on this ? (No i haven't booked without the USB yet , and yes I'm only thinking of that now but im not at home )

System : Raspberry Pi4
SD Card - 32 Gig with Noobs
External - USB with ntfs conencted , mounted to /media/pi/Media and symlink to /mnt/



Code: Select all

df -ah

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        28G   26G  438M  99% /
devtmpfs        1.8G     0  1.8G   0% /dev
sysfs              0     0     0    - /sys
proc               0     0     0    - /proc
securityfs         0     0     0    - /sys/kernel/security
tmpfs           2.0G   14M  1.9G   1% /dev/shm
devpts             0     0     0    - /dev/pts
tmpfs           2.0G  107M  1.9G   6% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
cgroup2            0     0     0    - /sys/fs/cgroup/unified
cgroup             0     0     0    - /sys/fs/cgroup/systemd
cgroup             0     0     0    - /sys/fs/cgroup/memory
cgroup             0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup             0     0     0    - /sys/fs/cgroup/blkio
cgroup             0     0     0    - /sys/fs/cgroup/pids
cgroup             0     0     0    - /sys/fs/cgroup/devices
cgroup             0     0     0    - /sys/fs/cgroup/net_cls
cgroup             0     0     0    - /sys/fs/cgroup/cpuset
cgroup             0     0     0    - /sys/fs/cgroup/freezer
systemd-1          -     -     -    - /proc/sys/fs/binfmt_misc
debugfs            0     0     0    - /sys/kernel/debug
sunrpc             0     0     0    - /run/rpc_pipefs
mqueue             0     0     0    - /dev/mqueue
configfs           0     0     0    - /sys/kernel/config
/dev/mmcblk0p6  253M   40M  213M  16% /boot
binfmt_misc        0     0     0    - /proc/sys/fs/binfmt_misc
tmpfs           391M     0  391M   0% /run/user/1000
gvfsd-fuse      0.0K  0.0K  0.0K    - /run/user/1000/gvfs
fusectl            0     0     0    - /sys/fs/fuse/connections
/dev/sda2       3.7T  2.2T  1.6T  58% /media/pi/Media
tracefs            0     0     0    - /sys/kernel/debug/tracing

Code: Select all

df -i


Filesystem         Inodes  IUsed      IFree IUse% Mounted on
/dev/root         1820672 152619    1668053    9% /
devtmpfs           117772    451     117321    1% /dev
tmpfs              183820     80     183740    1% /dev/shm
tmpfs              183820    687     183133    1% /run
tmpfs              183820      3     183817    1% /run/lock
tmpfs              183820     14     183806    1% /sys/fs/cgroup
/dev/mmcblk0p6          0      0          0     - /boot
tmpfs              183820     18     183802    1% /run/user/1000
/dev/sda2      1644217428  15835 1644201593    1% /media/pi/Media
[email protected]:/opt/CouchPotato/logs# 

Code: Select all

cat /proc/version 

Linux version 4.19.50-v7l+ ([email protected]) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #895 SMP Thu Jun 20 16:03:42 BST 2019

Code: Select all

sudo du -ah / --exclude=/media | sort -n -r | head -n 20

1020K	/home/pi/.config/NzbDrone/MediaCover/44
1016K	/usr/share/icons/gnome/256x256/apps
1016K	/usr/share/doc/Greenfoot/scenarios
1016K	/usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0.9.0
1016K	/usr/lib/arm-linux-gnueabihf/libcephfs.so.2.0.0
1016K	/lib/firmware/ath10k/QCA4019/hw1.0
1016K	/home/pi/.config/NzbDrone/MediaCover/28
1012K	/usr/share/themes/PiX/gtk-3.0
1012K	/usr/share/locale/ka
1012K	/usr/lib/python3/dist-packages/oauthlib
1012K	/usr/lib/python2.7/dist-packages/oauthlib
1012K	/usr/lib/python2.7/dist-packages/Crypto/SelfTest
1012K	/usr/lib/node_modules/node-red/node_modules/moment-timezone/data
1012K	/usr/lib/chromium-browser/make_top_domain_list_for_edit_distance
1012K	/usr/include/python3.7m
1008K	/usr/share/perl/5.28.1/CPAN
1008K	/usr/share/locale/ka/LC_MESSAGES


find / -type f ! -path "/media/*"  -size +10000k -exec ls -lh {}  \; | awk '{print $5 ": " $9}' | sort -nr | head -n 40


135M: /usr/lib/chromium-browser/chromium-browser
120M: /usr/lib/jvm/java-11-openjdk-armhf/lib/modules
120M: /usr/lib/jvm/java-11-openjdk-armhf/jmods/java.base.jmod
99M: /usr/lib/chromium-browser/chromium-browser-v7
90M: /var/log/kern.log.1
66M: /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages
63M: /usr/lib/jvm/java-8-openjdk-armhf/jre/lib/rt.jar
58M: /usr/lib/arm-linux-gnueabihf/jni/libjfxwebkit.so
52M: /usr/lib/arm-linux-gnueabihf/libLLVM-6.0.so.1
44M: /usr/lib/pypy/bin/libpypy-c.so
35M: /home/pi/MagPi/MagPi82.pdf
34M: /usr/lib/python3.7/config-3.7m-arm-linux-gnueabihf/libpython3.7m-pic.a
34M: /usr/lib/python3.7/config-3.7m-arm-linux-gnueabihf/libpython3.7m.a
34M: /usr/lib/arm-linux-gnueabihf/libwebkit2gtk-4.0.so.37.37.4
32M: /usr/lib/arm-linux-gnueabihf/libQt5WebKit.so.5.212.0
31M: /var/log/daemon.log.1
30M: /var/cache/apt/srcpkgcache.bin
30M: /var/cache/apt/pkgcache.bin
30M: /opt/vc/src/hello_pi/hello_video/test.h264
26M: /usr/lib/arm-linux-gnueabihf/libicudata.so.63.1
26M: /usr/lib/arm-linux-gnueabihf/libicudata.a
25M: /var/log/auth.log.1
24M: /run/log/journal/483f0652e97242ef8e9807ce40f8f5a2/[email protected]bcf638c52.journal
24M: /run/log/journal/483f0652e97242ef8e9807ce40f8f5a2/[email protected]2f5ca87c9.journal
24M: /run/log/journal/483f0652e97242ef8e9807ce40f8f5a2/[email protected]a805c4c3f.journal
24M: /run/log/journal/483f0652e97242ef8e9807ce40f8f5a2/[email protected]40058733e.journal
23M: /opt/CouchPotato/.git/objects/pack/pack-fa0189f745d4f84314f2a443b04e0cd90d4ba0cb.pack
23M: /opt/CouchPotato/database/id_stor
22M: /usr/lib/python2.7/config-arm-linux-gnueabihf/libpython2.7-pic.a
22M: /usr/lib/python2.7/config-arm-linux-gnueabihf/libpython2.7.a
20M: /usr/lib/chromium-browser/libpepflashplayer.so
20M: /opt/teamviewer/tv_bin/TeamViewer
19M: /usr/lib/gcc/arm-linux-gnueabihf/8/cc1plus
19M: /usr/lib/arm-linux-gnueabihf/libnode.so.64
18M: /usr/share/mythes/th_en_US_v2.dat
18M: /usr/lib/gcc/arm-linux-gnueabihf/8/cc1
17M: /usr/lib/mono/aot-cache/arm/mscorlib.dll.so
17M: /usr/lib/jvm/java-11-openjdk-armhf/jmods/java.desktop.jmod
17M: /usr/lib/gcc/arm-linux-gnueabihf/8/lto1
14M: /var/log/messages.1

User avatar
RaTTuS
Posts: 10412
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: /dev/root is at 100%

Mon Jul 15, 2019 10:49 am

without look at all this
sudo umount /media/pi/Media
ls -l /media/pi/Media
is there stuff there ?
if so remove it before remounting the sda2 again
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

djtaz
Posts: 6
Joined: Wed Apr 27, 2016 10:37 am

Re: /dev/root is at 100%

Mon Jul 15, 2019 2:39 pm

RaTTuS wrote:
Mon Jul 15, 2019 10:49 am
without look at all this
sudo umount /media/pi/Media
ls -l /media/pi/Media
is there stuff there ?
if so remove it before remounting the sda2 again
Thanks a million , that's exactly what it was. I was mounting over a folder that was there already. there and i couldnt see it when the mount was active.
What i did was :

1. Unmounted the drive ( sudo umount -l /media/pi/Media )
2. Did a list ( ls /media/pi/Media ) and saw that the folder was still there
3. Renamed the folder ( sudo mv /media/pi/Media /media/pi/Old )
4. Remounted the drive ( mount -t ntfs-3g -o uid=pi,gid=debian-transmission /dev/sda2 /media/pi/Media )
5. Moved all of the files from the /media/pi/Old (which is on the SD card) to /media/pi/Media (which is on the USB drive

Thanks again for the input , i was going in circles and hadnt considered that i had a mount point overwriting the other folder !

pablok
Posts: 53
Joined: Thu Dec 26, 2013 4:46 pm
Location: Westerkwartier, Groningen (NL)

Re: /dev/root is at 100%

Fri Aug 30, 2019 4:24 pm

@RaTTuS: Thank you so much! :D

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

Re: /dev/root is at 100%

Fri Aug 30, 2019 4:48 pm

I wouldn't use du -ah for this as when sorted like that 10M will come later in the list than 9000K, which is obviously wrong.

Try du -ak to use just KB for all values.

I see Rattus has supplied the solution anyway, the old "mount over existing files" trick.

Return to “Raspbian”