ceph iscsi #22
Description
The iSCSI gateway is integrating Ceph Storage with the iSCSI standard to provide a Highly Available (HA) iSCSI target that exports RADOS Block Device (RBD) images as SCSI disks.
- Tags:
- openstack ›
- storage ›
- misc ›
Overview
The ceph-iscsi charm deploys the Ceph iSCSI gateway service. The charm is intended to be used in conjunction with the ceph-osd and ceph-mon charms.
Usage
Configuration
See file config.yaml
for the full list of options, along with their
descriptions and default values.
Ceph BlueStore compression
This charm supports BlueStore inline compression
for its associated Ceph storage pool(s). The feature is enabled by assigning a
compression mode via the bluestore-compression-mode
configuration option. The
default behaviour is to disable compression.
The efficiency of compression depends heavily on what type of data is stored in the pool and the charm provides a set of configuration options to fine tune the compression behaviour.
Note: BlueStore compression is supported starting with Ceph Mimic.
Deployment
We are assuming a pre-existing Ceph cluster.
To provide multiple data paths to clients deploy exactly two ceph-iscsi units:
juju deploy -n 2 ceph-iscsi
Then add a relation to the ceph-mon application:
juju add-relation ceph-iscsi:ceph-client ceph-mon:client
Notes:
-
Deploying four ceph-iscsi units is theoretically possible but it is not an officially supported configuration.
-
The ceph-iscsi application cannot be containerised.
-
Co-locating ceph-iscsi with another application is only supported with ceph-osd, although doing so with other applications may still work.
Actions
This section covers Juju actions supported by the charm.
Actions allow specific operations to be performed on a per-unit basis. To
display action descriptions run juju actions ceph-iscsi
. If the charm is not
deployed then see file actions.yaml
.
add-trusted-ip
create-target
pause
resume
security-checklist
To display action descriptions run juju actions ceph-iscsi
. If the charm is
not deployed then see file actions.yaml
.
iSCSI target management
Create an iSCSI target
An iSCSI target can be created easily with the charm's create-target
action:
juju run-action --wait ceph-iscsi/0 create-target \
client-initiatorname=iqn.1993-08.org.debian:01:aaa2299be916 \
client-username=myiscsiusername \
client-password=myiscsipassword \
image-size=5G \
image-name=small \
pool-name=images
In the above, all option values are generally user-defined with the exception
of the initiator name (client-initiatorname
). An iSCSI initiator is
essentially an iSCSI client and so its name is client-dependent. Some
initiators may impose policy on credentials (client-username
and
client-password
).
Important: The underlying machines for the ceph-iscsi units must have internal name resolution working (i.e. the machines must be able to resolve each other's hostnames).
The gwcli
utility
The management of targets, beyond the target-creation action described above,
can be accomplished via the gwcli
utility. This CLI tool has its own shell,
and is available from any ceph-iscsi unit:
juju ssh ceph-iscsi/1
sudo gwcli
/> help
VMware integration
Ceph can be used to back iSCSI targets for VMware initiators. This is documented under VMware integration in the Charmed Ceph documentation.
Bugs
Please report bugs on Launchpad.
For general charm questions refer to the OpenStack Charm Guide.
Configuration
- bluestore-compression-algorithm
- (string) Compressor to use (if any) for pools requested by this charm. . NOTE: The ceph-osd charm sets a global default for this value (defaults to 'lz4' unless configured by the end user) which will be used unless specified for individual pools.
- bluestore-compression-max-blob-size
- (int) Chunks larger than this are broken into smaller blobs sizing bluestore compression max blob size before being compressed on pools requested by this charm.
- bluestore-compression-max-blob-size-hdd
- (int) Value of bluestore compression max blob size for rotational media on pools requested by this charm.
- bluestore-compression-min-blob-size
- (int) Chunks smaller than this are never compressed on pools requested by this charm.
- bluestore-compression-min-blob-size-hdd
- (int) Value of bluestore compression min blob size for rotational media on pools requested by this charm.
- bluestore-compression-min-blob-size-ssd
- (int) Value of bluestore compression min blob size for solid state media on pools requested by this charm.
- bluestore-compression-mode
- (string) Policy for using compression on pools requested by this charm. . 'none' means never use compression. 'passive' means use compression when clients hint that data is compressible. 'aggressive' means use compression unless clients hint that data is not compressible. 'force' means use compression under all circumstances even if the clients hint that the data is not compressible.
- bluestore-compression-required-ratio
- (float) The ratio of the size of the data chunk after compression relative to the original size must be at least this small in order to store the compressed version on pools requested by this charm.
- ceph-osd-replication-count
- (int) This value dictates the number of replicas ceph must make of any object it stores within the images rbd pool. Of course, this only applies if using Ceph as a backend store. Note that once the images rbd pool has been created, changing this value will not have any effect (although it can be changed in ceph by manually configuring your ceph cluster).
- 3
- ceph-pool-weight
- (int) Defines a relative weighting of the pool as a percentage of the total amount of data in the Ceph cluster. This effectively weights the number of placement groups for the pool created to be appropriately portioned to the amount of data expected. For example, if the compute images for the OpenStack compute instances are expected to take up 20% of the overall configuration then this value would be specified as 20. Note - it is important to choose an appropriate value for the pool weight as this directly affects the number of placement groups which will be created for the pool. The number of placement groups for a pool can only be increased, never decreased - so it is important to identify the percent of data that will likely reside in the pool.
- 5
- ceph-public-network
- (string) The IP address and netmask of the public (front-side) network (e.g., 192.168.0.0/24). If multiple networks are to be used, a space-delimited list of a.b.c.d/x can be provided.
- ec-profile-crush-locality
- (string) (lrc plugin) The type of the crush bucket in which each set of chunks defined by l will be stored. For instance, if it is set to rack, each group of l chunks will be placed in a different rack. It is used to create a CRUSH rule step such as step choose rack. If it is not set, no such grouping is done.
- ec-profile-device-class
- (string) Device class from CRUSH map to use for placement groups for erasure profile - valid values: ssd, hdd or nvme (or leave unset to not use a device class).
- ec-profile-durability-estimator
- (int) (shec plugin - c) The number of parity chunks each of which includes each data chunk in its calculation range. The number is used as a durability estimator. For instance, if c=2, 2 OSDs can be down without losing data.
- ec-profile-helper-chunks
- (int) (clay plugin - d) Number of OSDs requested to send data during recovery of a single chunk. d needs to be chosen such that k+1 <= d <= k+m-1. Larger the d, the better the savings.
- ec-profile-k
- (int) Number of data chunks that will be used for EC data pool. K+M factors should never be greater than the number of available zones (or hosts) for balancing.
- 1
- ec-profile-locality
- (int) (lrc plugin - l) Group the coding and data chunks into sets of size l. For instance, for k=4 and m=2, when l=3 two groups of three are created. Each set can be recovered without reading chunks from another set. Note that using the lrc plugin does incur more raw storage usage than isa or jerasure in order to reduce the cost of recovery operations.
- ec-profile-m
- (int) Number of coding chunks that will be used for EC data pool. K+M factors should never be greater than the number of available zones (or hosts) for balancing.
- 2
- ec-profile-name
- (string) Name for the EC profile to be created for the EC pools. If not defined a profile name will be generated based on the name of the pool used by the application.
- ec-profile-plugin
- (string) EC plugin to use for this applications pool. The following list of plugins acceptable - jerasure, lrc, isa, shec, clay.
- jerasure
- ec-profile-scalar-mds
- (string) (clay plugin) specifies the plugin that is used as a building block in the layered construction. It can be one of jerasure, isa, shec (defaults to jerasure).
- ec-profile-technique
- (string) EC profile technique used for this applications pool - will be validated based on the plugin configured via ec-profile-plugin. Supported techniques are ‘reed_sol_van’, ‘reed_sol_r6_op’, ‘cauchy_orig’, ‘cauchy_good’, ‘liber8tion’ for jerasure, ‘reed_sol_van’, ‘cauchy’ for isa and ‘single’, ‘multiple’ for shec.
- ec-rbd-metadata-pool
- (string) Name of the metadata pool to be created (for RBD use-cases). If not defined a metadata pool name will be generated based on the name of the data pool used by the application. The metadata pool is always replicated, not erasure coded.
- gateway-metadata-pool
- (string) RBD pool to use to store gateway configuration.
- iscsi
- key
- (string) Key ID to import to the apt keyring to support use with arbitary source configuration from outside of Launchpad archives or PPA's.
- loglevel
- (int) Mon and OSD debug level. Max is 20.
- 1
- pool-type
- (string) Ceph pool type to use for storage - valid values include ‘replicated’ and ‘erasure-coded’.
- replicated
- prefer-ipv6
- (boolean) If True enables IPv6 support. The charm will expect network interfaces to be configured with an IPv6 address. If set to False (default) IPv4 is expected. NOTE: these charms do not currently support IPv6 privacy extension. In order for this charm to function correctly, the privacy extension must be disabled and a non-temporary address must be configured/available on your network interface.
- rbd-pool-name
- (string) Optionally specify an existing pool that gateway should map to.
- source
- (string) Optional configuration to support use of additional sources such as: - ppa:myteam/ppa - cloud:trusty-proposed/kilo - http://my.archive.com/ubuntu main The last option should be used in conjunction with the key configuration option. Note that a minimum ceph version of 0.48.2 is required for use with this charm which is NOT provided by the packages in the main Ubuntu archive for precise but is provided in the Ubuntu cloud archive.
- use-syslog
- (boolean) If set to True, supporting services will log to syslog.