Data folder upgrade moved from to – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8-8.9

Briefly, this error occurs when Elasticsearch attempts to upgrade the data folder but encounters issues. This could be due to insufficient permissions, lack of disk space, or a problem with the upgrade process itself. To resolve this, ensure that Elasticsearch has the necessary permissions to access and modify the data folder. Also, check if there’s enough disk space for the upgrade. If the problem persists, consider manually moving the data folder or re-running the upgrade process.

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

Log Context

Log “data folder upgrade: moved from [{}] to [{}]” classname is NodeEnvironment.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                upgradeActions.add(() -> {
                    for (String folderName : folderNames) {
                        final Path sourceSubFolderPath = legacyDataPath.path.resolve(folderName);
                        final Path targetSubFolderPath = dataPath.path.resolve(folderName);
                        Files.move(sourceSubFolderPath; targetSubFolderPath; StandardCopyOption.ATOMIC_MOVE);
                        logger.info("data folder upgrade: moved from [{}] to [{}]"; sourceSubFolderPath; targetSubFolderPath);
                    }
                    IOUtils.fsync(dataPath.path; true);
                });
            }
            // now do the actual upgrade

 

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?