labctl
войти регистрация

Free the disk by removing the giant log

имя
disk-hog
образ
python:3.12-slim
таймаут
60с
проверка…

Задание

Free the disk by removing the giant log

A runaway logger has filled /var/log with a single giant file. The
application can't write any more logs and is refusing requests. Find the file
taking up almost all the space and remove it.

Symptoms

$ du -sh /var/log/* | sort -h | tail
4.0K  /var/log/system.log
200M  /var/log/huge.log

Required state

No regular file under /var/log may be larger than 100 MB.

Why

The textbook "disk full" incident. Pratices du, find -size, and
rm. Don't delete files you don't understand — but huge logs are safe to clear.

Подсказки

Hints: free the disk

  • Find big files: du -sh /var/log/* | sort -h | tail
  • Or with find: find /var/log -type f -size +100M
  • Remove the offender: rm /var/log/huge.log
  • If a process holds the file open, you may also need to restart it — but for
    this lab, removing the file is enough.

Последние попытки

  • Загрузка…

Разовый запуск (smoke-тест)

Атомарный цикл up → check → down. Полезно для CI; без предварительной подготовки состояния проверка завершится с ошибкой.