Pi Zero SD card full?!?

on a fresh formatted 8GB card with only PiHole on it? I imported many adlists at once, but never going to get the card full. what could it be?


thanks in advance!

The command df -h will show usage. Is it indeed full?

There are different flavours of Pi OS (assuming it's Pi OS on a Raspberry Pi). One of them is Pi OS Lite which is very small and doesn't have a desktop. Pi-hole installs, and works fine, on that version if needed.

1 Like

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

1 Like

https://tricorder.pi-hole.net/doyIfWmQ/

Raspi OS on Pi 2B, SD 8GB
658000 entries in blocklists.
No issue at all.

It is DietPi, i.e. less than half of the initial disk usage compared to RPi OS Lite.

However, 4.6 GiB available disk space should be more than sufficient to rebuild the gravity database? What is the size of the current one?

ls -l /etc/pihole/gravity.db

But I remember a team member who had similar issues with millions of blocklist entries. The error message does not indicate it, but AFAIK, part of the database assembly is done in RAM or /tmp tmpfs, and the 512 MiB of the RPi Zero is too small to cover that, unless you create a sufficiently large swap file.

@Pups_Gesicht
What is your swap size?

swapon

And can you check RAM usage during gravity update e.g. via dedicated SSH session with htop running?

1 Like

-rw-rw-r-- 1 pihole pihole 1677987840 Jul 8 16:31 /etc/pihole/gravity.db

/var/swap file 1.5G 18M -2


done, done and done. thanks for your help.

I am trying to import these adlists/blocklists here:

I guess the blocklists are too "heavy" for the small pi zero. because if I insert them one by one, then it tells me this here after a while:

i] Building tree...
[✗] Unable to build gravity tree in /etc/pihole/gravity.db_temp
Error: stepping, database or disk is full (13)
[✗] Unable to create database. Please contact support.

Can you please try to generate a Debug log including a Database Integrity Check?

On the command line:

pihole - d -c

Or using the web interface: mark both checkboxes.

1 Like

https://tricorder.pi-hole.net/vpI7oOzL/

The log shows there's nothing wrong with your database.

Let's try to remove the list size from the testing:

  • What happens if you disable every list list, except the default one (StevenBlack) and run gravity?
  • If it still fails, disable every list and run gravity again.

Removing a few lists makes it work again. seems the pi zero just cannot compile all these lists.

You should think if you really need all those lists and 17934536 domains.
In most cases this is unnecessary.

1 Like

1.6 GiB size, suspiciously close to filling up the entire RAM + swap size. In htop memory usage is okay, but does it remain the same until you run into the gravity update error? If the high usage is just for a short time, increasing the frequency might help to make it visual: htop -d 0.5

Another thing, if really /tmp is used, this tmpfs has 1 GiB max size, and Pi-hole might also abort before actually trying to fill it. To test whether really RAM size and/or tmpfs size is the issue:

sudo /boot/dietpi/func/dietpi-set_swapfile 2048
sudo mount -o remount,size=2G /tmp
sudo pihole -g

However, this is more to narrow down the issue while I wouldn't recommend it as long-term solution. It will kill your SD card faster. I agree with @rdwebdesign to instead better reduce the number of block lists/domains.

If really RAM/tmpfs is the issue, another solution could be to use a USB stick/drive, either only for the swap file, or better for the whole rootfs. dietpi-drive_manager can be used to move the rootfs to a USB drive while keeping only the boot partition on the SD card. This usually increases performance but more importantly increases the reliability of your system, as USB drives usually have a much longer life time/write cycles compared to SD cards, especially such small ones. So you won't run into sudden errors/crashes/data loss due to a dying SD card.

Please post the output of the following command from the Pi terminal so we can see if your problem can be duplicated:

pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT address FROM adlist where enabled=1"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.