Skip to main content

Not enough free space on the disk for Nexus to start

· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

In the process of migrating our workloads from our old Hashicorp Nomad cluster to the new cluster, I encountered an issue where our Sonatype Nexus instance failed to start properly in the new environment.

The Docker logs showed the following error:

com.orientechnologies.orient.core.exception.OLowDiskSpaceException: Error occurred
while executing a write operation to database ‘component’ due to limited free space
on the disk (4068 MB). The database is now working in read-only mode.

Please close the database (or stop OrientDB), make room on your hard drive and then
reopen the database. The minimal required space is 4096 MB. Required space is now
set to 4096MB (you can change it by setting parameter storage.diskCache.diskFreeSpaceLimit).

Initially, I was puzzled because there was definitely sufficient free disk space. To verify, I connected to the container and executed df -h command to check if Nexus was reporting the correct status. As per my observation, it appears that SeaweedFS - the distributed file system we are using - is not accurately reporting the size of the available disk space.

So technically, Nexus was right. Not enough disk space around to start OrientDB. Luckily, the minimum disk space needed can be configured in the nexus/etc/karaf/system.properties file. Change the setting storage.diskCache.diskFreeSpaceLimit to whatever makes the most sense to you.

Keep in mind that this can potentially harm the database, as the Nexus developers raised the free space limit to 4GB a while ago on purpose.