Wipe shard directories – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch attempts to delete shard directories but fails due to issues like insufficient permissions, disk space, or a running process using the directory. To resolve this, you can try the following: 1) Ensure Elasticsearch has the necessary permissions to delete directories. 2) Check if there’s enough disk space and free up space if needed. 3) Identify and stop any processes that might be using the directory. 4) Restart Elasticsearch. Always remember to backup your data before making any changes to avoid data loss.

This guide will help you check for common problems that cause the log ” {} wipe shard directories: [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: shard.

Log Context

Log “{} wipe shard directories: [{}]” classname is MultiDataPathUpgrader.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

upgradeFiles(shard; targetPath; targetPath.resolveTranslog(); ShardPath.TRANSLOG_FOLDER_NAME; paths);

        logger.info("{} wipe upgraded directories"; shard);
        for (Path path : paths) {
            if (path.equals(targetPath.getShardStatePath()) == false) {
                logger.info("{} wipe shard directories: [{}]"; shard; path);
                IOUtils.rm(path);
            }
        }

        if (FileSystemUtils.files(targetPath.resolveIndex()).length == 0) {

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?