No space left on the device

How do you clean up the lite node instance if the hosting device becomes full?

Hey @eric - I’ve seen this on devices with small storage (e.g. <10GB) in 1.3.6 of the node - the cache file and subsequent updates get too big and can fill the disk. We will try to make this more efficient in future releases. For now, you can delete the previous versions and cache files:

  1. SSH in and check disk space

SSH into your device and run in terminal: df

That will print out the disks on your device and how much space is available. For example:

Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root        9065864 4904988   4144492  55% /
  1. Assuming your device indeed is out of space, check to find large files in the snap cache:

In terminal run: sudo ls -al /var/lib/snapd/cache/

That will list what cache files you have - usually you’ll be able to see one or more large files there.

Then check your snaps - in terminal run: sudo ls -al /var/snap/diode-node/

You can list the contents of the numbered subdirectories - possibly some of them have large RPC cache files or logs in them. There will be a symlink for current showing which numbered folder is in use. You can relatively safely blow away the numbered folders that are not in use (see next).

  1. Delete large files

To delete cache, in terminal run: sudo sh -c 'rm -rf /var/lib/snapd/cache/*'
To delete unused numbered folders (e.g. folder 28), in terminal run: sudo rm -r /var/snap/diode-node/28

  1. Verify you now have enough space:

In terminal run: df

Ideally you’ll be under 50% utilized on /dev/root (or whatever your main disk is).

  1. Force upgrade of your diode-node version:

In terminal run: sudo snap refresh diode-node

  1. Run the node and make sure it works

In terminal run: sudo snap start diode-node
Then run: diode-node.info

That should show that your snap is running and that you have some connected peers…

2 Likes