JuniorTroubleshooting

A production server is failing writes. Disk is 100% full. Walk me through what you do.

What they are really testing: A classic because the obvious action is dangerous. They want to see you find the space before deleting, and know the deleted-but-held-open file trap.

A real interview question

A production server is failing writes. Disk is 100% full. Walk me through what you do.

What most people say

drag me

I would delete the largest log files to free up space immediately.

Deleting a log a process holds open frees no space at all, so it looks like nothing happened, and deleting a log you have not identified can destroy the evidence you need for the incident that filled it.

The follow-ups they ask next

  • You deleted 40 GB and df still shows full. Why?

    A process holds the file open, so the inode is not released. Find it with lsof and restart or signal the process. Truncating the file in place instead of deleting avoids this entirely.

  • Disk shows 40% free but writes still fail. What else?

    Inode exhaustion, a read-only remount after a filesystem error, quota limits, or the space being reserved for root. Check dmesg for filesystem errors.

What the interviewer is listening for

  • Measures before deleting
  • Knows the deleted-but-open trap
  • Checks inodes as a separate cause

What sinks the answer

  • Deletes logs immediately
  • Confused when space does not return
  • No prevention afterwards

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

First [find the space with du rather than guessing], and [check inodes too, since exhaustion looks identical]. Reclaim by [rotating and compressing rather than deleting evidence]. Know that [deleting a file a process holds open frees nothing until it closes], so [check lsof]. Then [log rotation, retention, and an alert at 80%].

Keep going with troubleshooting

All 87 devops engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free