SD card full but can't find the files responsible for it

  • I have libreelec running on a raspberry 3 and it reports that my SD card is quite full (10.3 GB of 12.5 GB used in mounted folder /storage)

    If I check that folder with du I only see 229.4 MB instead of 10.3 GB of files (I used the "x" parameter to exclude the as well mounted folder "media" in the storage folder which is actually my NAS)

    df is looking at the filesystem itself while du looks at actual file sizes, so it could be assumed that I have many thousands of zero sized files somewhere, but in total this folder only contains 7000 files (after I deleted all thumbnails and picons):

    Code
    find /storage -path /storage/media -prune -o -type f | wc -l
    => 7.040

    with a "normal" block size of 4 KB:

    One further reason I read why du can differ from df so much is that there may be deleted files to which some process still has a handle on and therefore space is not freed by now. But I checked this as well and there is not pending file deletion (plus I did a reboot and the issue remains).

    Code
    find /proc/*/fd -ls 2> /dev/null | grep '(deleted)'
    => (nothing)

    Does anybody have an idea what else could cause this? Where are the 10 GB clogging my SD card? :/

  • Try without /storage/media mounted - if you copied stuff to /storage/media (on the SD card) that won't show up with du -x - as the smb mount is hiding that.

    so long,

    Hias

  • You are right. There have been recordings under that folder on the SD card. Probably the NAS wasn't available at some times when recordings started and therefore the recordings have been stored on the SD card. I moved them now to the NAS and the disk space is freed. Thanks.

  • I have the same exact issue and I can't identify what is getting my drive full.

    Same setup.

    Anybody that can help?

    Answer is above your post. "You were right".

    If you have any mount points setup above directory/mount point that has mismatching used capacity, get those mount points unmounted and check what you have under them.