Issue
- My Search service's volume is corrupted and the ES nodes don't start up
Environment
- Liferay PaaS
Resolution
1. Let's assume that you have the following volume definition in your Search service's LCP.json:
"volumes": {
"esdata": "/data"
}
2. Specify a new path for the volume (this will move the contents from the previous path to the new one so the ES nodes and indices that were in the /data folder will be moved to the /data-new folder)
"volumes": {
"esdata": "/data-new"
}
3. Deploy the Search service4. Go to the Search service's Shell and from all instances delete all the files from the /data-new folder
5. Change the path of the volume back to the original one
"volumes": {
"esdata": "/data"
}
6. Deploy the Search service
Additional Information
- Only use this approach when your Search service is unable to start up because the volume is corrupted
- Please note that a full reindex is needed after taking these steps
- If you only deploy the Search service using the CLI, you might need to restart Liferay as well, if you see that it's unable to connect to Elasticsearch