← 문제 라이브러리
Linux Intermediate LINUX-002 · 24 min

Narrowing a /var partition surge with du and lsof

A hands-on disk analysis scenario that extends into a file-handle problem where space is not reclaimed after deletion.

무료
시나리오

The operator deleted a large log file, but /var usage did not drop at all. By du it looks like space is freed, but in reality a process is holding the deleted file handle, so the partition usage is not reclaimed.

먼저 볼 것
  • Identify the primary failure signal in the Filesystem Drill scenario.
  • Separate visible symptoms from the underlying technical dependency.
  • Describe the safest recovery path and the follow-up prevention work.
점검 체크리스트
  1. Summarize the current impact and the last known change.
  2. Collect direct evidence from logs, runtime state, and configuration before changing anything.
  3. Separate immediate recovery from permanent prevention work.
복구와 재발 방지

Choose the smallest safe recovery action first, then record the prevention work that reduces repeat incidents.

같이 보면 좋은 질문
Why does df disagree with du in some Linux incidents?

Deleted-but-open files can keep blocks allocated, so du misses them while df still shows the space consumed.

What is the safer recovery move?

Identify the process holding the file, decide whether it can reopen or restart safely, and only then reclaim the space.