Cinder is the block storage service for the Openstack project. . This charm provides a lvm backend for Cinder.
lvm Storage Backend for Cinder
This charm provides a lvm storage backend for use with the Cinder charm. It is intended to be used as a subordinate to main cinder charm.
juju deploy cinder juju deploy cinder-lvm juju add-relation cinder-lvm cinder
It will prepare the devices (format) and then will talk to main cinder charm to pass on configuration which cinde charm will inject into it's own configuration file. After that, it does nothing except watch for config changes and reconfig cinder.
The configuration is passed over to cinder using a juju relation. Although cinder has a few different services, it is the cinder-volume service that will make use of the configuration added.
Note: The devices must be local to the cinder-volume, so you will probably want to deploy this service on the compute hosts, since the cinder-volume that will be running on the controller nodes will not have access to any physical device (it is normally deployed in lxd).
A more complete example, using a bundle would be the folowing.
Your normal cinder deployed to controllers, will all services running:
hacluster-cinder: charm: cs:hacluster cinder: charm: cs:cinder num_units: 3 constraints: *combi-access-constr bindings: "": *oam-space public: *public-space admin: *admin-space internal: *internal-space shared-db: *internal-space options: worker-multiplier: *worker-multiplier openstack-origin: *openstack-origin block-device: None glance-api-version: 2 vip: *cinder-vip use-internal-endpoints: True region: *openstack-region to: - lxd:1003 - lxd:1004 - lxd:1005
Extra cinder-volume only services running on compute-nodes (basically the same as above but with "enabled-services: volume"). Take care to leave "block-device: None" because we do not want to use internal lvm functionality from the cinder charm, and will instead make the cinder-lvm charm do that:
cinder-volume: charm: cs:cinder num_units: 9 constraints: *combi-access-constr bindings: "": *oam-space public: *public-space admin: *admin-space internal: *internal-space shared-db: *internal-space options: worker-multiplier: *worker-multiplier openstack-origin: *openstack-origin enabled-services: volume block-device: None glance-api-version: 2 use-internal-endpoints: True region: *openstack-region to: - 1000 - 1001 - 1002 - 1003 - 1004 - 1005 - 1006 - 1007 - 1008
And then the cinder-lvm charm (as a subordinate charm):
cinder-lvm-fast: charm: cs:cinder-lvm num_units: 0 options: alias: fast block-device: /dev/nvme0n1 allocation-type: default erase-size: '50' unique-backend: true cinder-lvm-slow: charm: cs:cinder-lvm num_units: 0 options: alias: slow block-device: /dev/sdb /dev/sdc /dev/sdd allocation-type: default erase-size: '50' unique-backend: true
And then the extra relations for cinder-volume and cinder-lvm-[foo]:
- [ cinder-volume, mysql ] - [ "cinder-volume:amqp", "rabbitmq-server:amqp" ] - [ "cinder-lvm-fast", "cinder-volume" ] - [ "cinder-lvm-slow", "cinder-volume" ]
See config.yaml for details of configuration options.
One or more block devices (local to the charm unit) are used as an LVM physical volumes, on which a volume group is created. A logical volume is created ('openstack volume create') and exported to a cloud instance via iSCSI ('openstack server add volume').
Note: It is not recommended to use the LVM storage method for anything other than testing or for small non-production deployments.
Important Make sure the designated block devices exist and are not in use (formatted as physical volumes or other filesystems), unless they already have the desired volume group (in which case it will be used instead of creating a new one).
This charm only prepares devices for lvm and configures cinder and do not execute any active function, therefore there is not need for high-availability.
- (string) An alias given to the storage pool. This alias will be used to derive the volume-group name and the backend name, and the idea is to differentiate volume groups and backend names if you deploy multiple instances of the charm on the same host. . If you are only deploying one instance, this name does not matter and "default" is probably ok. But if you are deploying multiple instances then change the name on each instance to a more meaningful name, like "pool1", "pool2", etc. or "fast", "slow" in case you want to name them after the kind of storage you have.
- (string) Select between thin or thick models when allocating logical volumes in volume group. Options are 'default' for thick, 'thin' for thin or 'auto' for thin if supported otherwise thick.
- (string) The block devices on which to create an LVM volume group. This is a mandatory option and leaving it blank will give you and error. . This can be a space-separated list of block devices to attempt to use in the cinder lvm volume group. Each block device detected will be added to the available physical volumes in the volume group. . Formatting as a physical volume will fail if the device is already formatted and may potentially have data, unless 'overwrite' is true. . May be set to the path and size of a local file (/path/to/file|$sizeG), which will be created and used as a loopback device (for testing only). $sizeG defaults to 5G.
- (string) Comma-separated list of key=value config flags. These values will be added to standard options when injecting config into cinder.conf.
- (string) Cloud instances provide ephemeral storage which is normally mounted on /mnt. . Providing this option will force an unmount of the ephemeral device so that it can be used as a Cinder storage device. This is useful for testing purposes (cloud deployment is not a typical use case). . You need to pass the mount point to be unmounted, if blank (or invalid) it will be ignored.
- (string) Normally volumes are zeroed completelly before being released after deletion, thus making it slow. Set to a small number to zero only that amount of MB in the beginning of the volume (ex. 50). Values are in MB and 0 (the default) means all (the whole volume).
- (boolean) If true, charm will attempt to overwrite block devices containing previous filesystems or LVM, assuming it is not in use.
- (boolean) If True, charm will attempt to remove missing physical volumes from volume group, if logical volumes are not allocated on them.
- (boolean) If True, charm will attempt to remove missing physical volumes from volume group, even when logical volumes are allocated on them. This option overrides 'remove-missing' when set.
- (string) TLS certificate to install and use for any listening services. . __NOTE__: This configuration option will take precedence over any certificates received over the ``certificates`` relation.
- (string) TLS key to use with certificate specified as ``ssl_cert``. . __NOTE__: This configuration option will take precedence over any certificates received over the ``certificates`` relation.
- (boolean) Normally all backends which this charm configures are going to register themselves with Cinder using the same backend name (the name of the volume group), therefore allowing Cinder to use them as a cluster and schedule volume creation to any of the nodes that pass cinder filter selection. Set this to True to make each host register with a unique name (volume-group name + hostname) so that each host can be individually addressable in cinder backend list.