ubuntu:ram_disk:mount_logs_and_temporary_directories_in_ram
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:ram_disk:mount_logs_and_temporary_directories_in_ram [2025/05/21 08:31] – peter | ubuntu:ram_disk:mount_logs_and_temporary_directories_in_ram [2025/05/21 08:39] (current) – peter | ||
---|---|---|---|
Line 9: | Line 9: | ||
To keep the system functional, the needed log directory structure is automatically created at startup, ensuring that applications expecting these directories will not fail and critical system services can still operate normally. | To keep the system functional, the needed log directory structure is automatically created at startup, ensuring that applications expecting these directories will not fail and critical system services can still operate normally. | ||
- | The directories | + | The directories |
* **/tmp** – Used by applications for temporary files that often contain sensitive information. | * **/tmp** – Used by applications for temporary files that often contain sensitive information. | ||
Line 56: | Line 56: | ||
* **size=512M** or **size=50M** – Limits the maximum amount of RAM each directory can use to prevent memory exhaustion. | * **size=512M** or **size=50M** – Limits the maximum amount of RAM each directory can use to prevent memory exhaustion. | ||
* **0 0** – Disables filesystem checking and backup operations as they’re unnecessary for tmpfs. | * **0 0** – Disables filesystem checking and backup operations as they’re unnecessary for tmpfs. | ||
+ | |||
+ | The amount of RAM for /var/log can be increased as needed. | ||
+ | |||
+ | * Just ensure there is enough memory available. | ||
+ | * For systems with heavy logging, perhaps increase this from 50M to 100M or more. | ||
+ | * To see how much space is being used, monitor the RAM usage with: <code bash>df -h / | ||
+ | * if the system has limited RAM, allocating too much to tmpfs could lead to memory pressure. | ||
+ | * Start with conservative sizes and adjust based on the system resources and needs. | ||
</ | </ | ||
Line 193: | Line 201: | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== How to troubleshooting issues if all logs are cleared at reboot ===== | ||
+ | |||
+ | For troubleshooting specific issues, temporarily set up selective log persistence by creating a small script that copies important logs to a secure location before shutdown. | ||
+ | |||
+ | * Alternatively, | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== TAGS ===== | ||
+ | |||
+ | * TAG: Administration | ||
+ | * TAG: Filesystem | ||
+ | * TAG: Privacy | ||
+ | * TAG: Scripting | ||
+ | * TAG: Security | ||
+ | |||
+ | ---- | ||
ubuntu/ram_disk/mount_logs_and_temporary_directories_in_ram.1747816286.txt.gz · Last modified: 2025/05/21 08:31 by peter