Linux /storage seems full but almost nothing in (Openelec/Pi3)
#1
Hi,
i'm running Openelec 6.0.3 on a Pi3 with a 8GB SD card. Partition is expanded, so df shows size of 6.8G for /storage.
According to df this 6.8G are fully used - but a du on /stugare only shows total file size of approx. 140M - so, where did al the space go?
I found one old post on the same topic: 207575 (thread)

Below outputs of du and df.
Code:
##############################################
#                  OpenELEC                  #
#             http://openelec.tv             #
##############################################

OpenELEC (official) Version: 6.0.3
OpenELEC:~ # pwd
/storage
OpenELEC:~ # df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                364.1M         0    364.1M   0% /dev
/dev/mmcblk0p1          255.7M    116.3M    139.4M  45% /flash
/dev/mmcblk0p2            6.8G      6.8G         0 100% /storage
/dev/loop0              107.4M    107.4M         0 100% /
tmpfs                   369.0M         0    369.0M   0% /dev/shm
tmpfs                   369.0M      5.1M    363.9M   1% /run
tmpfs                   369.0M         0    369.0M   0% /sys/fs/cgroup
tmpfs                   369.0M      4.0K    369.0M   0% /tmp
tmpfs                   369.0M     20.0K    369.0M   0% /var
192.168.111.10:/Qmultimedia/Recordings
                        915.4G    811.6G    103.8G  89% /storage/recordings
OpenELEC:~ # du -hxd 2
1.0K    ./.ssh
1.0K    ./.update
1.0K    ./pictures
1.0K    ./music
1.0K    ./tvshows
2.0K    ./.config/hwdb.d
11.0K   ./.config/aacs
2.0K    ./.config/modprobe.d
7.0K    ./.config/tmpfiles.d
3.0K    ./.config/modules-load.d
2.0K    ./.config/rc_keymaps
4.0K    ./.config/sysctl.d
40.0K   ./.config/system.d
3.0K    ./.config/udev.rules.d
80.0K   ./.config
12.0K   ./lost+found
1.0K    ./videos
26.0M   ./.kodi/addons
1.0K    ./.kodi/sounds
1.0K    ./.kodi/system
1.0K    ./.kodi/media
115.8M  ./.kodi/userdata
84.0K   ./.kodi/temp
141.9M  ./.kodi
10.0K   ./.cache/ssh
2.0K    ./.cache/cron
18.0K   ./.cache/connman
1.0K    ./.cache/bluetooth
3.0K    ./.cache/services
1.0K    ./.cache/cores
39.0K   ./.cache
1.0K    ./screenshots
142.0M  .
OpenELEC:~ #

As recommended in old post I inserted the SD card of the Pi into a PC running gpartd live CD. Below is the fsck info of the SD card:
Code:
GParted 0.27.0 --enable-online-resize

libparted 3.2
Dateisystem (ext4) auf /dev/sdc2 überprüfen und reparieren  00:00:02    ( ERFOLG )
         
/dev/sdc2 kalibrieren  00:00:01    ( ERFOLG )
         
Pfad: /dev/sdc2 (Partition)
Anfang: 528384
Ende: 15353855
Größe: 14825472 (7.07 GiB)
Dateisystem auf /dev/sdc2 auf Fehler überprüfen und (falls möglich) diese beheben  00:00:01    ( ERFOLG )
         
e2fsck -f -y -v -C 0 /dev/sdc2  00:00:01    ( ERFOLG )
         
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

6291 inodes used (0.34%, out of 1853440)
17 non-contiguous files (0.3%)
26 non-contiguous directories (0.4%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 6253/29
7408637 blocks used (99.94%, out of 7412736)
0 bad blocks
0 large files

5576 regular files
703 directories
0 character device files
0 block device files
0 fifos
0 links
3 symbolic links (1 fast symbolic link)
0 sockets
------------
6282 files
e2fsck 1.43.3 (04-Sep-2016)
Dateisystem bis zum Auffüllen der Partition vergrößern  00:00:00    ( ERFOLG )
         
resize2fs -p /dev/sdc2  00:00:00    ( ERFOLG )
         
resize2fs 1.43.3 (04-Sep-2016)
The filesystem is already 7412736 (1k) blocks long. Nothing to do!

========================================

So, I've still no clue where over 6.5GB went to. Any idea?

Regards, Matthias
Reply
#2
You might have a large file in the root of the /storage partition, which won't show up with your "du" command.

Try running:
Code:
du -xcd2 -acm | sort -k1n
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
If you are trying to track down where big files are,try

du --maxdepth=1|sort - nr
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
Thanks both, yet i'm still confused.

First remark: compared to yesterday I deleted the entire Thumbnails subfolder to temporarily free up some space, so the sizes of today output are not comparable to yesterdays results.

Here is the output of the sugested commands (the 2nd had to be modified, since was not running on openelec plus additional x to exclude mounted subfolder.

Code:
OpenELEC:~ # du -xcd2 -achm | sort -k1n
0       ./.ash_history
0       ./.ash_history.18352.new
0       ./.ash_history.32519.new
0       ./.ash_history.6330.new
0       ./.cache
0       ./.cache/bluetooth
0       ./.cache/connman
0       ./.cache/cores
0       ./.cache/cron
0       ./.cache/hostname
0       ./.cache/random.data
0       ./.cache/services
0       ./.cache/ssh
0       ./.cache/timezone
0       ./.config
0       ./.config/aacs
0       ./.config/hosts.conf
0       ./.config/hwdb.d
0       ./.config/modprobe.d
0       ./.config/modules-load.d
0       ./.config/rc_keymaps
0       ./.config/samba.conf.sample
0       ./.config/sysctl.d
0       ./.config/system.d
0       ./.config/tmpfiles.d
0       ./.config/udev.rules.d
0       ./.kodi/media
0       ./.kodi/sounds
0       ./.kodi/system
0       ./.kodi/temp
0       ./.ssh
0       ./.update
0       ./lost+found
0       ./music
0       ./pictures
0       ./screenshots
0       ./tvshows
0       ./videos
5       ./.kodi/userdata
26      ./.kodi/addons
31      .
31      ./.kodi
31      total
Code:
OpenELEC:~ # du -xd 1|sort -nr
64460   .
64180   ./.kodi
160     ./.config
78      ./.cache
24      ./lost+found
2       ./videos
2       ./tvshows
2       ./screenshots
2       ./pictures
2       ./music
2       ./.update
2       ./.ssh
And again currect df
Code:
OpenELEC:~ # df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                364.1M         0    364.1M   0% /dev
/dev/mmcblk0p1          255.7M    116.3M    139.4M  45% /flash
/dev/mmcblk0p2            6.8G      6.7G    110.5M  98% /storage
/dev/loop0              107.4M    107.4M         0 100% /
tmpfs                   369.0M         0    369.0M   0% /dev/shm
tmpfs                   369.0M      5.6M    363.4M   2% /run
tmpfs                   369.0M         0    369.0M   0% /sys/fs/cgroup
tmpfs                   369.0M      4.0K    369.0M   0% /tmp
tmpfs                   369.0M     20.0K    369.0M   0% /var
192.168.111.10:/Qmultimedia/Recordings
                        915.4G    811.6G    103.8G  89% /storage/recordings
Still telling 6.7G used whereas the du shows only 31MB.

Regards, Matthias
Reply
#5
What is in /storage itself?
Code:
ls -l /storage
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#6
Dear all,

the content was already visible in above du commands. The first du in my last post showed 4 files there (.ash_hist*). The total used size of /sturage was 31M at that moment whereas df still showed 6.7G used.

I stopped investigating the problem and formated the SD card and installed a fresh LibreElec 7.0.2 from the scratch. Now all is fine, df and du match...

Regards, Matthias
Reply

Logout Mark Read Team Forum Stats Members Help
/storage seems full but almost nothing in (Openelec/Pi3)0