Linux Problem updating Pi

LaatSahab

Skilled
Getting following error message when trying to update my Raspbian.
Code:
Last login: Sat Mar 12 22:24:15 2022
pi@rpi4:~$ sudo apt-get clean
pi@rpi4:~$ sudo apt-get update
Hit:1 https://downloads.plex.tv/repo/deb public InRelease
Err:1 https://downloads.plex.tv/repo/deb public InRelease
  Splitting up /var/lib/apt/lists/downloads.plex.tv_repo_deb_dists_public_InRelease into data and signature failed
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Err:2 http://archive.raspberrypi.org/debian buster InRelease
  Splitting up /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_buster_InRelease into data and signature failed
Get:3 https://apt.mopidy.com buster InRelease [14.1 kB]
Err:3 https://apt.mopidy.com buster InRelease
  Error writing to output file - write (28: No space left on device) [IP: 185.199.109.153 443]
Get:4 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Err:4 http://raspbian.raspberrypi.org/raspbian buster InRelease
  Error writing to output file - write (28: No space left on device) [IP: 93.93.128.193 80]
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://downloads.plex.tv/repo/deb public InRelease: Splitting up /var/lib/apt/lists/downloads.plex.tv_repo_deb_dists_public_InRelease into data and signature failed
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org/debian buster InRelease: Splitting up /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_buster_InRelease into data and signature failed
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease  Error writing to output file - write (28: No space left on device) [IP: 93.93.128.193 80]
W: Failed to fetch https://apt.mopidy.com/dists/buster/InRelease  Error writing to output file - write (28: No space left on device) [IP: 185.199.109.153 443]
W: Failed to fetch https://downloads.plex.tv/repo/deb/dists/public/InRelease  Splitting up /var/lib/apt/lists/downloads.plex.tv_repo_deb_dists_public_InRelease into data and signature failed
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease  Splitting up /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_buster_InRelease into data and signature failed
W: Some index files failed to download. They have been ignored, or old ones used instead.
pi@rpi4:~$
This lack of memory has messed up my Plex too which now gives lack of memory/space as issue when trying to play back any content stored on NAS and for last 2 days, even Pihole isn't working properly either. Anyway to salvage this or do I need to make a fresh and clean install?
 
It's RPi 4B 4GB version. SD card is standard 16 Gig one and I did expand the file system using CLI
How much free storage is available on the SD card?
Can you tell in more detail about your setup? Where the content and temp files of Plex are stored?
I am having the exact same setup as you, with the exception that I am running Jellyfin instead of Plex. Media content and temp files are stored on External HDD which is also served as NAS by Samba. Everything works flawlessly.
 
Maybe you should confirm once whether the disk space is actually full or not...

df -h

Edit : Also, " du -hcs /* " might help you to find if the space is being used up by some not-expected mountpoint.
 
Last edited:
Maybe you should confirm once whether the disk space is actually full or not...

df -h

Edit : Also, " du -hcs /* " might help you to find if the space is being used up by some not-expected mountpoint.
Code:
pi@rpi4:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   14G     0 100% /
devtmpfs        1.7G     0  1.7G   0% /dev
tmpfs           1.9G  1.2M  1.9G   1% /dev/shm
tmpfs           1.9G   25M  1.8G   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1       1.8T  810G  931G  47% /mnt/WD
/dev/mmcblk0p1  253M   49M  204M  20% /boot
tmpfs           373M  8.0K  373M   1% /run/user/1000
pi@rpi4:~$ du -hcs
158M    .
158M    total
pi@rpi4:~$
Even after uninstalling almost all non-essential packages and manually deleting tmp folder, problem persists.
 
To see whether there any big files in sdcard hogging disk space, try the following

find / -type d -name mnt -prune -o -size +100M -print

The above command will show the files with size of 100 MB or more in your sdcard and will exclude the /mnt directory which has your media files
 
Code:
pi@rpi4:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   14G     0 100% /
devtmpfs        1.7G     0  1.7G   0% /dev
tmpfs           1.9G  1.2M  1.9G   1% /dev/shm
tmpfs           1.9G   25M  1.8G   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1       1.8T  810G  931G  47% /mnt/WD
/dev/mmcblk0p1  253M   49M  204M  20% /boot
tmpfs           373M  8.0K  373M   1% /run/user/1000
pi@rpi4:~$ du -hcs
158M    .
158M    total
pi@rpi4:~$
Even after uninstalling almost all non-essential packages and manually deleting tmp folder, problem persists.
Please try the below command
Code:
[root@fedora ~]# du -hcs /*
4.0K    /bin
265M    /boot
0    /dev
29M    /etc
119G    /home
4.0K    /lib
4.0K    /lib64
.
.
 
Code:
pi@rpi4:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   14G     0 100% /
devtmpfs        1.7G     0  1.7G   0% /dev
tmpfs           1.9G  1.2M  1.9G   1% /dev/shm
tmpfs           1.9G   25M  1.8G   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1       1.8T  810G  931G  47% /mnt/WD
/dev/mmcblk0p1  253M   49M  204M  20% /boot
tmpfs           373M  8.0K  373M   1% /run/user/1000
pi@rpi4:~$ du -hcs
158M    .
158M    total
pi@rpi4:~$
Even after uninstalling almost all non-essential packages and manually deleting tmp folder, problem persists.
We can 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:
sudo mount --bind / /mnt
sudo ncdu -x /mnt

This should show the total size taken by each dir in '/' in descending order of their sizes.
 
@OP you are clearly out of space.

Check if the apps are storing the metadata on the root partition - try changing it. Or if you have a downloader, its clearly downloading to the root partition.

The latter occurred to me because the mount point got messed up and transmission defaulted to the folder on the root partition.
 
@OP you are clearly out of space.

Check if the apps are storing the metadata on the root partition - try changing it. Or if you have a downloader, its clearly downloading to the root partition.

The latter occurred to me because the mount point got messed up and transmission defaulted to the folder on the root partition.
The latter seems to be a more probable cause. Way to fix it?
 
The latter seems to be a more probable cause. Way to fix it?

Issue is then with your mounting. When the device reboots, the USB mount becomes invalid.

Ways to fix - easy way was to install OMV. The hit on resources was negligible. Mounting is never an issue plus webui means far more ease of use. When configuring the downloads folder, I would just SSH, get the paths made using commandline and set it correctly. A little bit of work, but easier in the long run. I think did this recently for @ravihpa

The harder way is to follow this tutorial


I think there is a dedicated thread for RPI modes may want to merge the thread @Crazy_Eddy @viral
 
No, the mount works as I'm able to access it across LAN on various devices. Problem is something sinister as even Pihole isn't working properly. Will do a fresh installation on Sunday
 
Back
Top