title: Openshift : application directory gets empty after creating a persistent volume
body: <p>i have a java application that is working fine on Openshift. However i need to create a persistent volume in order to store the logs and some data of this app. The logs and the data are exported in the same directory where the jar is located. I created a persistent volume claim and mounted it to the app directory in the container like so:</p>
  
  <pre><code>volumeMounts:
  - mountPath: /app
    name: app-volume
  volumes:
  - name: app-volume
    persistentVolumeClaim:
      claimName: app-pvc
  </code></pre>
  
  <p>After mounting the volume i the container crashes because it doesn't find the jar file. When i take a look inside the container the /app directory is really empty.</p>
  
  <p>when i unmount the persistent volume or create one in another path than where the jar located the application works fine</p>
  
  <p>Is it not possible in Openshift to have a persistent volume in the same directory where the application located ? Or why is the directory getting empty.</p>
  
  <p><a href="https://i.stack.imgur.com/QVIn9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QVIn9.png" alt="container"></a></p>