Introduction
I've seen a few times that a MicroSD card can fill up with recording. Normally I put all recordings on a NAS (another PI working as a NAS or a real NAS) but sometimes the NAS may not be up so the LibreElec instance is unable to connect the NAS drive on boot. In such cases, files are written to a small MicroSD card and this can fill up. When the instance restarts it can find the network drive but the SD card is still full but the local directories are hidden by the NAS mount points. So how can these files be removed?
I have 2 servers with mount points that I link to /storage/downloads and storage/recordings. As the / character can't be used in a file a hyphen is used.
Get Current Status
You can get an idea of free space with the command df -h when I issued the commend I saw 100% of /devmmcblk0p2 was used. After removing the local files the 100% usage had dropped to 15%.
systemctl status storage-recordings.mount
systemctl status storage-downloads.mount
Remove current mount points so we can see the local files
systemctl disable storage-recordings.mount
systemctl disable storage-downloads.mount
reboot
Remove files on the local file system
systemctl disable storage-recordings.mount
systemctl disable storage-downloads.mount
reboot
You now have the local files exposed and can remove them.
Remove the files to free up space. Check the free space reported by df -h
Mask the directories on the local file system with network mount points
systemctl enable storage-recordings.mount
systemctl enable storage-downloads.mount
reboot