Adding Volume Services to Your Deployment

This topic describes how Cloud Foundry (CF) operators can deploy volume services.


A volume service gives apps access to a remote filesystem, such as NFS. To provide a volume service for CF developers to use with their apps, you must deploy a driver and broker pair. For current versions of CF that have been been deployed with cf-deployment, deploying brokers and drivers is typically accomplished using operations files as outlined below in Example: Deploy NFS to CF.

Additional Information

For more information about volume services and the drivers and brokers available to CF, see the following links:

Note: For test purposes, you can deploy the Local Volume Release if running a single Diego Cell CF deployment. This is not intended for production deployments.


If you have any questions, you can contact the team that develops volume services for CF on the #persi channel in the Cloud Foundry (Open Source) Slack organization.

Example: Deploy NFS Volume Service to CF

The following procedure provides an example of how to deploy the NFS broker and corresponding driver to an existing CF deployment.


This procedure requires the following:

  • A current version of Cloud Foundry deployed as described here.
  • A BOSH v2 CLI.
  • An NFS Server. If you require it, a test server can be deployed following the instructions below.

Redeploy CF with NFS Enabled

  1. Clone the cf-deployment repository from git, if you do not already have it:

    $ cd ~/workspace
    $ git clone
    $ cd ~/workspace/cf-deployment

  2. Redeploy your cf-deployment while including the nfs ops file:

    $ bosh -e my-env -d cf deploy cf.yml -v deployment-vars.yml \
        -o operations/enable-nfs-volume-service.yml

    Note: The above bosh deploy command is an example, but your deployment command should match the one you used to deploy CF initially, with the addition of a -o operations/enable-nfs-volume-service.yml option.

  3. Run the nfsbrokerpush errand to deploy the NFS service broker application:

    $ bosh -e my-env -d cf run-errand nfsbrokerpush

Your CF deployment now has a running service broker and volume drivers and is ready to mount NFS volumes.

Deploying the NFS Test Server

To deploy the NFS test server, you can fetch the operations file from the persi-ci github repository and include that operation with a -o flag. This creates a separate VM with nfs exports you can use to experiment with volume mounts.

Note: By default, the nfs test server expects that your CF deployment is deployed to a 10.x.x.x subnet. If you are deploying to a subnet that is not 10.x.x.x (e.g. 192.168.x.x) then you will need to override the “export_cidr” property.
Edit the operations file, and replace this line:
nfstestserver: {}
with something like this:
nfstestserver: {export_cidr:}

Grant Access to the NFS Broker

Grant access to the services of the broker.

$ cf enable-service-access nfs
$ cf enable-service-access nfs-experimental

CF Developers can now create an NFS service and bind instances to their apps as outlined in the Using an External File System (Volume Services) topic.

(Optional) LDAP Support

For better security, it is recommended to configure your deployment of nfs-volume-release to connect to an external LDAP server to resolve user credentials into uids. See this note for more details.

Create a pull request or raise an issue on the source for this page in GitHub