Elastic failing to start with below error. When i don't link any mount points then it is working. But when i link with PVC it fails to start. Looks like it is related to permission issue.
"failed to obtain node locks, tried [/usr/share/elasticsearch/data];
maybe these locations are not writable or multiple nodes were started on the same data path?",
"error.stack_trace":"java.lang.IllegalStateException: failed to obtain node locks, tried [/usr/share/elasticsearch/data];
My PVC is like below
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: esdata-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
and i am using in my deployment file like below
volumeMounts:
- name: esdata
mountPath: /usr/share/elasticsearch/data
volumes:
- name: esdata
persistentVolumeClaim:
claimName: esdata-pvc