Skip to content

Commit

Permalink
GITBOOK-1005: Pramod's Aug 9 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Suseela-S authored and gitbook-bot committed Aug 9, 2024
1 parent 1933b10 commit 9cafd33
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
* [Configure IPSec VPN Gateway to connect to external Systems using Strongswan](deployment/deployment-guide/configure-ipsec-vpn-strongswan.md)
* [Troubleshooting](deployment/deployment-guide/troubleshooting/README.md)
* [PostgreSQL Database not Starting due to Replication Checkpoint Error](deployment/deployment-guide/troubleshooting/postgresql-database-not-starting-due-to-replication-checkpoint-error..md)
* ["No Space Left on the Device" Warning](deployment/deployment-guide/troubleshooting/no-space-left-on-the-device-warning.md)
* [No Space Left on the Device Warning](deployment/deployment-guide/troubleshooting/no-space-left-on-the-device-warning.md)
* [Use Cases](use-cases/README.md)
* [Technology for Inclusion](use-cases/technology-for-inclusion/README.md)
* [Registration in Low Connectivity Areas](use-cases/technology-for-inclusion/registration-in-low-connectivity-areas.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,59 @@
---
description: This guide is to fix "Storage Issues" caused by the NFS server on a node.
layout:
title:
visible: true
description:
visible: false
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: true
---

# "No Space Left on the Device" Warning
# No Space Left on the Device Warning

### Configuring Logrotate for Hourly Rotation
This guide is to resolve **Storage Issues** caused by the NFS server on a node.

To manage storage issues caused by excessive log files, you can configure `logrotate` to handle log rotation on an hourly basis. This guide provides step-by-step instructions for modifying the `logrotate` configuration.\
### Configuring logrotate for hourly rotation

You can configure `logrotate` to handle log rotation on an hourly basis to manage storage issues caused by excessive log files.

1. Open the `rsyslog` logrotate configuration file in a text editor:
Below are the step-by-step instructions for modifying the `logrotate` configuration.

1. Open the `rsyslog` logrotate configuration file in a text editor.

```bash
sudo vim /etc/logrotate.d/rsyslog
```
2. Modify the configuration to set up hourly rotation:
1. Change the rotate directive to 6:\
2. Modify the configuration to set up hourly rotation.
1. Change the rotate directive to 6.\
`rotate 6`
2. Change the `weekly` directive to `hourly`:\
2. Change the `weekly` directive to `hourly.`\
`hourly`
3. Add the `maxsize` directive if it's not already present:\
3. Add the `maxsize` directive if it is not already present.\
`maxsize 0`
3. Test the configuration to ensure there are no syntax errors:
3. Test the configuration to ensure there are no syntax errors.

```bash
sudo logrotate -d /etc/logrotate.conf
```
4. Open the logrotate timer configuration file in a text editor:
4. Open the logrotate timer configuration file in a text editor.

```bash
sudo nano /lib/systemd/system/logrotate.timer
```
5. Modify the timer to trigger log rotation hourly:\
5. Modify the timer to trigger log rotation hourly.\
Change `OnCalendar=daily` to `OnCalendar=hourly`
6. Restart the `logrotate.timer` to apply the changes:
6. Restart the `logrotate.timer` to apply the changes.

```bash
sudo systemctl daemon-reload
sudo systemctl restart logrotate.timer
```
7. If needed, clear other log files using the following commands to free up more storage.

```bash
sudo rm -f /var/log/*.gz /var/log/*.1 /var/log/*.old
```

0 comments on commit 9cafd33

Please sign in to comment.