Chapter 13. Management of iSCSI gateway using the Ceph Orchestrator

As a storage administrator, you can use Ceph Orchestrator to deploy the iSCSI gateway. The iSCSI Gateway presents a Highly Available (HA) iSCSI target that exports RADOS Block Device (RBD) images as SCSI disks.

You can deploy an iSCSI gateway by either using the placement specification or the service specification, like an YAML file.

This section covers the following administrative tasks:

13.1. Prerequisites

  • A running Red Hat Ceph Storage cluster.
  • Root-level access to all the nodes.
  • Hosts are added to the cluster.
  • All manager, monitor and OSD daemons are deployed.

13.2. Deploying the iSCSI gateway using the command line interface

Using the Ceph Orchestrator, you can deploy the iSCSI gateway using the ceph orch command in the command line interface.

Prerequisites

  • A running Red Hat Ceph Storage cluster.
  • Hosts are added to the cluster.
  • All manager, monitor and OSD daemons are deployed.

Procedure

  1. Log into the Cephadm shell:

    Example

    [root@host01 ~]# cephadm shell

  2. Create the pool:

    Syntax

    ceph osd pool create POOL_NAME

    Example

    [ceph: root@host01 /]# ceph osd pool create mypool

  3. Deploy iSCSI gateway using command line interface:

    Syntax

    ceph orch apply iscsi POOLNAME admin admin --placement="NUMBER_OF_DAEMONS HOST_NAME_1 HOST_NAME_2"

    Example

    [ceph: root@host01 /]# ceph orch apply iscsi mypool admin admin --placement="1 host01"

Verification

  • List the service:

    Example

    [ceph: root@host01 /]# ceph orch ls

  • List the hosts and process:

    Syntax

    ceph orch ps --daemon_type=DAEMON_NAME

    Example

    [ceph: root@host01 /]# ceph orch ps --daemon_type=iscsi

13.3. Deploying the iSCSI gateway using the service specification

Using the Ceph Orchestrator, you can deploy the iSCSI gateway using the service specification.

Prerequisites

  • A running Red Hat Ceph Storage cluster.
  • Hosts are added to the cluster.
  • All manager, monitor and OSD daemons are deployed.

Procedure

  1. Log into the Cephadm shell:

    Example

    [root@host01 ~]# cephadm shell

  2. Navigate to the following directory:

    Syntax

    cd /var/lib/ceph/DAEMON_PATH/

    Example

    [ceph: root@host01 /]# cd /var/lib/ceph/iscsi/

    Note: If the directory `iscsi does not exist, create it.

  3. Create the iscsi.yml file:

    Example

    [ceph: root@host01 iscsi]# touch iscsi.yml

  4. Edit the iscsi.yml file to include the following details:

    Syntax

    service_type: iscsi
    service_id: iscsi
    placement:
      hosts:
        - HOST_NAME_1
        - HOST_NAME_2
    spec:
      pool: POOL_NAME  # RADOS pool where ceph-iscsi config data is stored.
      trusted_ip_list: "IP_ADDRESS_1,IP_ADDRESS_2" # optional
      api_port: ... # optional
      api_user: API_USERNAME # optional
      api_password: API_PASSWORD # optional
      api_secure: true/false # optional
      ssl_cert: | # optional
      ...
      ssl_key: | # optional
      ...

    Example

    service_type: iscsi
    service_id: iscsi
    placement:
      hosts:
        - host01
    spec:
      pool: mypool

  5. Deploy iSCSI gateway using service specification:

    Syntax

    ceph orch apply -i FILE_NAME.yml

    Example

    [ceph: root@host01 iscsi]# ceph orch apply -i iscsi.yml

Verification

  • List the service:

    Example

    [ceph: root@host01 /]# ceph orch ls

  • List the hosts, daemons, and processes:

    Syntax

    ceph orch ps --daemon_type=DAEMON_NAME

    Example

    [ceph: root@host01 /]# ceph orch ps --daemon_type=iscsi

13.4. Removing the iSCSI gateway using the Ceph Orchestrator

You can remove the iSCSI gateway daemons using the ceph orch rm command.

Prerequisites

  • A running Red Hat Ceph Storage cluster.
  • Root-level access to all the nodes.
  • Hosts are added to the cluster.
  • At least one iSCSI gateway daemon deployed on the hosts.

Procedure

  1. Log into the Cephadm shell:

    Example

    [root@host01 ~]# cephadm shell

  2. List the service:

    Example

    [ceph: root@host01 /]# ceph orch ls

    1. Remove the service

      Syntax

      ceph orch rm SERVICE_NAME

      Example

      [ceph: root@host01 /]# ceph orch rm iscsi.iscsi

Verification

  • List the hosts, daemons, and processes:

    Syntax

    ceph orch ps

    Example

    [ceph: root@host01 /]# ceph orch ps

Additional Resources