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
/usrIncorrect. /usr mainly holds shared programs and read-mostly data.
/bootIncorrect. /boot stores boot files, not growing logs and queues.
/varCorrect. /var is the main location for logs, spools, and caches.
/etcIncorrect. /etc stores configuration rather than variable log data.
Try it yourself
An example you can run in a temporary verification environment.
du -sh /var/log /var/cache 2>/dev/null | sed -n '1,4p'Expected result
/var配下の可変データ使用量。環境により値は異なるKey points
- /var stores variable data
- Capacity exhaustion can be isolated
- Monitoring and rotation still matter
Notes
- Environment: FHSに沿うLinux / 読み取り確認
- Use read-only inspection or a disposable disk when learning storage commands.
- Partition and LVM writes can destroy data; verify the target before running them.
Foundation review
Place the operation
Separating /var can contain growth, but it also creates allocation and monitoring responsibilities.
Check the side effect
Measure growth and leave recovery space before assigning a fixed partition size.