What to Do When the Database is Out of Disk Space


If the disk hosting OrientDB runs out of disk space, you will see errors similar to the following in the nexus.log:

com.orientechnologies.orient.core.exception.OLowDiskSpaceException: Error occurred while executing a write operation to database 'component' due to limited free space on the disk (0 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 database is in read-only mode and will not allow any changes. You will either need to add disk space to the volume or free up some space on the disk before the database will start to operate normally. 

Once you have freed up some space, you can restart Nexus and run the Compact Blobstore task which will help reduce the space consumed by the database on the disk.

How Can I Free Up Some Space?

One approach you could use to freeing up disk space is to temporarily move one of your database directories to a location with more space and create a symlink to point to it. For instance, to move the component database:

  1. stop nexus
  2. move the sonatype-work/nexus3/db/component directory to another location. Keep performance in mind when choosing a location if possible. Also make sure the permissions are retained.
  3. create a symlink to point to the new component directory
  4. start nexus

This should give you enough space to get the system running. Once you have added more space to the disk, you can move the database directory back to its original location.


Have more questions? Submit a request


Article is closed for comments.