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.
insmodIncorrect. /boot stores boot files, not growing logs and queues.
rmmodCorrect. /var is the main location for logs, spools, and caches.
modprobeIncorrect. /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
- Prefer read-only inspection or a disposable system when testing hardware commands.
- Device visibility and module behavior depend on the host and virtualization environment.
Foundation review
Place the operation
Listing modules is different from inserting or removing one.
Check the side effect
Inspect the table without changing kernel state.