Overview
When you are trying to create or edit a policy or category in the Policy Manager, you might get the error below. This article explains how to resolve it.
Unexpected Error: disk I/O error.
Root Cause Analysis
This happens when the Policy Manager cannot write to the /var partition. The most likely reason for this inability to write to the partition is that the disk is full. In the PeerApp systems, when enabled, the folder /var/log/peerapp/ can contain a big list of compressed log files.
Solution
-
Access the server SSH console.
-
Log in as root, using the
su -
command. -
Verify the status of the /var partition using the command below:
df -h /var
The output should be similar to the one below, showing a 100% use.
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 36G 36G 0 100% /var -
Go to the logs partition, using the command below:
cd /var/log/
-
Check for the space used by entering the following command:
du --max-depth=1 -h
-
Delete or compress old files.
-
To compress old logs, e.g., from July 2019, use the following command:
cd var/log/peerapp/
tar -czvf peerapp_system_2019.07.tgz peerapp_system_2019.07.* --remove-files -
To delete old logs, e.g., older than 60 days, you can verify which files should be removed.
find /var/log/peerapp/* -mtime +60 -exec ls -alh {} \;
If the files are not necessary, delete them.
find /var/log/peerapp/* -mtime +60 -exec rm -f {} \;
-
Confirmation
Run the following command to verify there is free space in the /var partition.
df -h
Once the free space has been verified, the issue is resolved.