storage #0

Supports: precise
Add to new model


Generic storage charm subordinate. Intended to aid in making charms
easier to interface with external storage solutions without having
to speak and understand each type. Presents a single mount point on
the unit, and communicates that back to your service through the data

Subordinate Storage Charm

This charm aims to allow storage to be mounted and consumed in your juju
environment. Simply attach this charm to any that supports the "storage"
interface, and the charmed application will start writing data into the provided

Sample Deployment

juju deploy <principal charm>
juju deploy storage --config <my_storage_config.yaml>
juju add-relation <principal_charm> storage

Sample Data Relation

The Storage charm is designed to make your life easier as a charm author.
Implementing the data relation is very straightforward.

Sample Metadata:

    interface: storage
    scope: container
    optional: true

Sample Joined Hook:

relation-set mountpoint=/mnt/mydata

Sample Changed Hook:

mount=`relation-get mountpoint`
if [ -z "$mount" ] ; then
    juju-log "wait for related service to start"
    exit 0
service my_service stop
change_my_service_to_use_mount $mount
service my_service start


  • Create/Format cloud storage if requested
  • Support other providers
  • Support relating to other charms via mount, ceph-client, etc.
  • Support config changes?


(string) The backend storage provider. Will be mounted at root, and can be one of, local, blockstoragebroker or nfs. If you set to blockstoragebroker, you should provide a suitable value for volume_size.
(string) The root path where external directories will be mounted.
(int) The volume size in GB to request from the block-storage-broker.