1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up Pi-hole

Discussion in 'Linux & Open Source' started by NoNameNoNumber, Nov 5, 2016.

  1. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,724

    Location: Bath

    sounds like what happened when the SDcard died in my RPI1b, if you get a chance give "sudo apt autoremove" a go to see if it would make any difference.
     
  2. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,868

    Location: West Sussex, UK

    That seemed to do something. It cleared 800kb of space, I rebooted it, and I can now access the GUI. Updating didn't work, but according to the GUI I'm up to date anyway.

    What can I do to stop it filling up again? I assume it's the logs it's keeping?

    Just checked the disk usage, I'm 99% full! That's the problem.
    Code:
    pi@raspberrypi:~ $ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        11G   11G  119M  99% /
    devtmpfs        459M     0  459M   0% /dev
    tmpfs           464M   40K  463M   1% /dev/shm
    tmpfs           464M   13M  452M   3% /run
    tmpfs           5.0M  4.0K  5.0M   1% /run/lock
    tmpfs           464M     0  464M   0% /sys/fs/cgroup
    /dev/mmcblk0p6   68M   23M   46M  33% /boot
    tmpfs            93M     0   93M   0% /run/user/1000
    tmpfs            93M     0   93M   0% /run/user/999
    /dev/mmcblk0p5   30M  398K   28M   2% /media/pi/SETTINGS
    
     
  3. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,724

    Location: Bath

    What size memory card is it? By default the logs are stored in ram to reduce disk writes.

    Have you installed a GUI or running cli only? No point installing GUI if only running cli just uses up disk space.
     
  4. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,868

    Location: West Sussex, UK

    It's 16GB. I did install a GUI to set it all up before I discovered I could connect with Putty and use commands.

    I suppose I should start again with command only? Will that still give the web GUI?
     
  5. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,724

    Location: Bath

    yeah you still get the web interface, no need for a GUI if all its doing is running pihole, I would take an image of the SDCard as it is now (I use win32Diskimager on a Windows Machine or DD on linux) then put a fresh version of Raspian on there with no GUI, you can strip the drive image down and not install half the stuff that it comes with at default, I was only using an 8gb card and raspian with pihole installed was less than 1gb in total.
     
  6. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,868

    Location: West Sussex, UK

    Thanks, I'll add to my to do list for the weekend.
     
  7. maj

    Wise Guy

    Joined: Jul 19, 2010

    Posts: 2,315

    Location: Newcastle

    Look to see if there is a command to remove the GUI. You could take a look at Raspbian lite and Diet Pi is also another option. It comes as a GUI by default but it is more light-weight than even Raspbian lite. Appears you can even remove the GUI on it with a command to use even less resources.
     
    Last edited: Nov 14, 2019
  8. Feek

    Commissario

    Joined: Oct 16, 2002

    Posts: 27,241

    Location: In the radio shack

    I always use Raspbian Lite for this sort of thing - Looking at my two Piholes now, the free space has barely changed since I set them up so I don't know what's using your space. Is the Pi doing anything else?
     
  9. MonkeyBasher

    Gangster

    Joined: Dec 4, 2009

    Posts: 417

    This is what is confusing me. Pi hole runs cleanup and update tasks at stupid oclock every day so it shouldn't be using loads of space.
    i run raspbian, pi hole, vnc, deluged, kodi etc etc, and a usb HD from my pi3 and the disk usage on the SD card is pretty static.
    resources when using pihole on a pi should not be issue. at most it uses about 8-10% of the cpu and thats when i am hammering my net from mutliple devices.
     
  10. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,868

    Location: West Sussex, UK

    It's only used for Pi-Hole. I'll do some research and see what I can do.

    Just tried to access Pi-Hole web GUI and it unavailable again.

    Code:
    pi@raspberrypi:~ $ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        11G   11G     0 100% /
    devtmpfs        459M     0  459M   0% /dev
    tmpfs           464M   64M  400M  14% /dev/shm
    tmpfs           464M   47M  417M  11% /run
    tmpfs           5.0M  4.0K  5.0M   1% /run/lock
    tmpfs           464M     0  464M   0% /sys/fs/cgroup
    /dev/mmcblk0p6   68M   23M   46M  33% /boot
    tmpfs            93M     0   93M   0% /run/user/999
    tmpfs            93M     0   93M   0% /run/user/1000
    
    That's what has changed.
     
  11. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,724

    Location: Bath

    What are you running as root? Why is the root partition 11gb and full?
     
  12. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,868

    Location: West Sussex, UK

    I've no idea. I followed a guide to install Pi-Hole, I don't really know what I'm doing. If there's any commands I can run to give you that info let me know
     
  13. Feek

    Commissario

    Joined: Oct 16, 2002

    Posts: 27,241

    Location: In the radio shack

    To give you an idea, this is one of mine:

    Code:
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        15G  1.8G   12G  13% /
    devtmpfs        213M     0  213M   0% /dev
    tmpfs           217M  2.4M  214M   2% /dev/shm
    tmpfs           217M   23M  195M  11% /run
    tmpfs           5.0M  4.0K  5.0M   1% /run/lock
    tmpfs           217M     0  217M   0% /sys/fs/cgroup
    /dev/mmcblk0p1  253M   41M  212M  16% /boot
    tmpfs            44M     0   44M   0% /run/user/999
    tmpfs            44M     0   44M   0% /run/user/1000
    
     
  14. Avathar77

    Mobster

    Joined: May 28, 2010

    Posts: 3,964

    Location: London, UK

    For sometime now, my pihole is saying "lost connection to API"
    anyone know why?
     
  15. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,724

    Location: Bath

    Log in and do a pihole -up to update it, this should fix that issue.
     
  16. Avathar77

    Mobster

    Joined: May 28, 2010

    Posts: 3,964

    Location: London, UK

    thank you, but it says....

    Checking for updates...
    fatal: unable to access 'https://github.com/pi-hole/pi-hole.git/': Could not resolve host: github.com
    Pi-hole Core: up to date
    fatal: unable to access 'https://github.com/pi-hole/AdminLTE.git/': Could not resolve host: github.com
    Web Interface: up to date
    FTL: Something has gone wrong, contact support

    [✓] Everything is up to date!
     
  17. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,724

    Location: Bath

    In that case do pihole reconfigure and do.it all from the start, it does have a static IP yeah?
     
  18. Avathar77

    Mobster

    Joined: May 28, 2010

    Posts: 3,964

    Location: London, UK

    yes it does have a static IP.
    Will reconfig, thank you
     
  19. the-evaluator

    Wise Guy

    Joined: Sep 24, 2015

    Posts: 1,616

    That's because it's trying to use itself for DNS resolution and as Pi-Hole isn't working it has no working DNS.

    I've had this before and just wiped the SD card and did a fresh installation. If there's nothing else on the Pi that'll be the quicker route to get it up and running again.
     
  20. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,868

    Location: West Sussex, UK

    Got round to sorting my space issue out today.

    Started from scratch, new install of Rasbian Buster Lite, no GUI, and fresh Pi-Hole installation.

    Will keep an eye on space used, hopefully it won't change too much.

    Thanks for all the help on this.

    Code:
    pi@raspberrypi:~ $ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        15G  1.4G   13G  10% /
    devtmpfs        459M     0  459M   0% /dev
    tmpfs           464M   40K  463M   1% /dev/shm
    tmpfs           464M   12M  452M   3% /run
    tmpfs           5.0M  4.0K  5.0M   1% /run/lock
    tmpfs           464M     0  464M   0% /sys/fs/cgroup
    /dev/mmcblk0p1  253M   52M  201M  21% /boot
    tmpfs            93M     0   93M   0% /run/user/999
    tmpfs            93M     0   93M   0% /run/user/1000