Seeking help with Debian root drive being full

I did the prune command a couple days ago, while it did free up some space, that file size tool ncdu still shows the current docker has 12gigs of logs.

I just want someone from Storj to tell me it is safe to do something and maybe provide safe steps on how to do it because this node if 5 years old, has a lot of used data and I don’t want to loose it and have to start all over.

Based on nuggets of comments from these last couple days, I speculate that I will have to stop the node, change the config.yaml to put the logs somewhere else, MAYBE delete the xxxx.jason-log file in the screenshots??? (that is the part I want someone to tell me is ok to do), then restart the node, and setup logrotate to auto delete the new log location

@Knowledge Would you be able to answer or know a storjling who can?

Seems to me that this may be a bigger issue for Storj Labs to look into. Older nodes not having logs rotated out trapped in the docker.

this is not a Storj Lab issue…
There are docker run commands you can use to log rotate it.

Well it sounds like a Docker issue. You can configure Docker to rotate and purge logs based on size limits. See here…

You can also remove the container and recreate it which will also purge the logs.

It’s difficult to help you if you don’t answer all questions.

I have done this and it doesn’t go down that I why I want to make sure I don’t break anything

last log shows 2024-04-24T20:26:13

Ok, that means, it’s the right logfile and currently used. If you don’t need the logs, just empty that file (don’t delete it!) with

echo > /path/to/file

1 Like

I ran the command. all seems healthy. node didn’t go offline. and df -h shows 28% down from 97%

Spoke too soon, just got the email that my node is down. Troubleshooting now

Rebooted VM. Back online. Drive space still at 28%, Dashboard says up and OK.

1 Like

Then it sounds that something is wrong with your docker installation. If you remove the container the log should be deleted with it.

1 Like

Hmm, I’ve check my own container, it show 7GB of logs as well (and I’ve watchtower so it got replacement when new node version came out?).

    command:
      - --log.output=config/storagenode.log

And your logs will be written to the file storagenode.log on your data location.
Then you likely will need to setup a logrotate on your host:

1 Like

Perhaps you may empty them like suggested by

However, it’s possible that you have other running containers, which may log to there. So I would suggest to stop and remove all containers, include stopped, you may see them with the command

docker ps -a

Then check a usage, it should be reduced.
After that run the needed containers back.

Perhaps this might help:

docker run -d --restart unless-stopped --stop-timeout 300 \
       (...) \
        --log-opt max-size=20m --log-opt max-file=3 \
        --name "storagenode" storjlabs/storagenode:latest \
        (...)
1 Like

It’s suggested there:

but I suppose was ignored…