[Solved] Error FileSystemException: /datas/nodes/0/indices/gtTXk-hnTgKhAcm-8n60Jw/1/index/.es_temp_file: structure needs to be cleaned up

The first problem I encountered was that the server suddenly lost power and caused elasticsearch to go down. When I started it again

FileSystemException: /data/elasticsearchDatas/datas/nodes/0/indices/gtTXk-hnTgKhAcm-8n60Jw/1/index/.es_temp_file: structure needs cleaning

Go to the corresponding directory to view, ls to view the file times

ls: cannot access write.lock: structure needs cleaning

Therefore, it must be determined that the partition data is damaged due to the power failure, and the file information is lost. So the partition needs to be repaired and remounted on the directory.

View disk mounts

df -h

You can see that the directory where the file is located is mounted on the partition /dev/sdc, which is what we need to fix.

Unmount the mounted partition first

umount /dev/sdc

then fix

xfs_repair /dev/sdc

After the repair is completed, restart the server or remount it. Of course, it depends on the persistent write of the partition you mounted into /etc/fstab. If it is written, restarting the server will remount the partition to the directory.
restart command

reboot

According to the above operation, my problem is solved, how about yours?