Design a server where logs and queues may grow rapidly.
Limit the impact on the root filesystem if they consume their allocation.
Which directory is the best separation candidate?
/var contains logs, spools, and caches. A separate filesystem can contain their growth, alongside monitoring and rotation.
Detailed explanation
lsmodIncorrect. /usr mainly holds shared programs and read-mostly data.
Incorrect. /usr mainly holds shared programs and read-mostly data.
insmodIncorrect. /boot stores boot files, not growing logs and queues.
Incorrect. /boot stores boot files, not growing logs and queues.
rmmodCorrect. /var is the main location for logs, spools, and caches.
Correct. /var is the main location for logs, spools, and caches.
modprobeIncorrect. /etc stores configuration rather than variable log data.
Incorrect. /etc stores configuration rather than variable log data.
Try it yourself
An example you can run in a temporary verification environment.
lsmod | sed -n '1,6p'Expected result
Module、Size、Used byの見出しとロード済みモジュールKey points
- /var stores variable data
- Capacity exhaustion can be isolated
- Monitoring and rotation still matter
Notes
- Environment: Linuxカーネル / kmod lsmod
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.