bluerobotics / BlueOS

The open source platform for ROV, USV, robotic system operation, development, and expansion.
https://blueos.cloud/docs/
Other
168 stars 80 forks source link

Deal with issues when the disk is full #2328

Open patrickelectric opened 10 months ago

patrickelectric commented 10 months ago

Check: https://github.com/bluerobotics/BlueOS/issues/2327, https://github.com/bluerobotics/BlueOS/issues/2323, https://github.com/bluerobotics/BlueOS/issues/2326, https://github.com/bluerobotics/BlueOS/issues/1015

The docker is able to start, but everything after that just results in unstable behavior. Some points that you suggested are already available as issues, others are relevant to recover the system.

Originally posted by @patrickelectric in https://github.com/bluerobotics/BlueOS/issues/2325#issuecomment-1902117968

joaoantoniocardoso commented 10 months ago

I know it might be trickier to manage the installation, but another valid strategy is to put /var in another partition.

patrickelectric commented 9 months ago

2359

voorloopnul commented 6 months ago

I installed one extension [Nortek Nucleus], that grew the docker log to 18GB in about a week, maybe kraken could add a limit in the size of the docker logs:

https://docs.docker.com/config/containers/logging/configure/#configure-the-default-logging-driver

--log-opt max-size=100m

joaoantoniocardoso commented 6 months ago

I've just freed ~12 gb here by doing:

sudo docker system prune -a # ~9 gb
sudo journalctl --vacuum-time=2d  # ~1 gb
sudo apt-get clean  # ~1 gb
patrickelectric commented 6 months ago

@joaoantoniocardoso how we end up with 1GB of unnecessary stuff in our apt ?

rafaellehmkuhl commented 6 months ago

I've just freed ~12 gb here by doing:

sudo docker system prune -a # ~9 gb
sudo journalctl --vacuum-time=2d  # ~1 gb
sudo apt-get clean  # ~1 gb

The docker prune is specially important, as there are A LOT of leftover overlays hanging there forever. It would be good to do it automatically, or at least putting a button on BlueOS to do that.

joaoantoniocardoso commented 6 months ago

@joaoantoniocardoso how we end up with 1GB of unnecessary stuff in our apt ?

Maybe I've installed many things on mine, but it'd be good to check how it is in a fresh install.

goasChris commented 4 months ago

We are discussing this subject a bit in our project, as we run robots 24/7, and they could be running for several days, maybe even weeks without restarting/power cycling.

I've not done very thorough digging, but I think it would be very nice to have some kind of parameter (maybe even user facing), that would permit you to set a target age for tlog files. If I set 7 days, then any tlog files older than 7 days would be auto purged (no sure how often that should run). Maybe a bit out of scope for this issue, but should help nonetheless.

I can make a separate issue if that is better.

EDIT: Also, before this can even happen, we would need mavlinkrouter to somehow auto split/rotate files every 200mb or 12 hours maybe.

patrickelectric commented 4 months ago

Hi @goasChris, thanks for your input. Indeed the tlogs are also important for us to track. Adding on it, the tlogs are already in the list. Let us know if you have anything that is not being tracked at the moment.

patrickelectric commented 4 months ago

About tlogs: https://github.com/mavlink-router/mavlink-router/issues/426

JoaoMario109 commented 4 months ago

Some things that take a lot of space and can be removed: