Pivotal Knowledge Base


How to Bind Volume Services With a Read-Only Mount Point


  • Pivotal Cloud Foundry® (PCF) 1.11.x, 1.12.x, and 2.0.x
  • Volume Services All Versions


When an Operator issues a cf bind-service commandVolume Services will mount a read-write filesystem by default. This is not always desirable should you need it to be read-only.

A Volume Services read-only mount may be achieved by putting “readonly”:true in the bind configuration JSON string.


The following syntax is an example of a bind-service command properly containing the readonly option for the mount.

cf bind-service <app-name> <nfs-service-instance> -c '{"uid":"2000","gid":"2000","mount":"/var/vcap/cpedev","readonly":true}


Due to an underlying kernel defect, the read-only NFS mount will show up as "mode”:”rw" in the service binding. 

Known Issue: As a PCF Operator you are unable to create volumes services with "mode": "ro", by default it is taking "mode": "rw". This happens because the read-only mounts show up as rw and not ro. Also you need to add "readonly": true to workaround this issue as mentioned above. This bug is captured in the Known Issues section for Elastic Runtime 1.11, Elastic Runtime 1.12, and Pivotal Application Service 2.0.

Additional Information

Look at the Mode for the Properties under volume_mounts in the Documentation:PCF 1.11PCF 1.12, and PCF 2.0


Powered by Zendesk