Dell PowerStore driver

本节解释如何配置和连接块存储节点到 PowerStore 存储集群。

支持的操作

  • 创建、删除、附加和分离卷。

  • 创建、删除卷快照。

  • 从快照创建卷。

  • 将镜像复制到卷。

  • 将卷复制到镜像。

  • 克隆卷。

  • 扩展卷。

  • 获取卷统计信息。

  • 同时将卷附加到多个服务器(多重附加)。

  • 将卷恢复到快照。

  • OpenStack replication v2.1 支持。

  • 创建、删除、更新一致性组。

  • 创建、删除一致性组快照。

  • 克隆一致性组。

  • 从一致性组快照创建一致性组。

  • 服务质量 (QoS)

  • Cinder 卷主动/主动支持。

驱动程序配置

将以下内容添加到 /etc/cinder/cinder.conf

[DEFAULT]
enabled_backends = powerstore

[powerstore]
# PowerStore REST IP
san_ip = <San IP>
# PowerStore REST username and password
san_login = <San username>
san_password = <San Password>
# Storage protocol
storage_protocol = <Storage protocol> # FC or iSCSI
# Volume driver name
volume_driver = cinder.volume.drivers.dell_emc.powerstore.driver.PowerStoreDriver
# Backend name
volume_backend_name = <Backend name>
# PowerStore allowed ports
powerstore_ports = <Allowed ports> # Ex. 58:cc:f0:98:49:22:07:02,58:cc:f0:98:49:23:07:02

使用 NVMe-OF 的驱动程序配置

从版本 2.1 开始,PowerStore 中添加了 NVMe-OF 支持。

注意

目前驱动程序仅支持通过 TCP 的 NVMe。

要配置 NVMe-OF 驱动程序,请将以下内容添加到 /etc/cinder/cinder.conf

[DEFAULT]
enabled_backends = powerstore

[powerstore]
# PowerStore REST IP
san_ip = <San IP>
# PowerStore REST username and password
san_login = <San username>
san_password = <San Password>
# Volume driver name
volume_driver = cinder.volume.drivers.dell_emc.powerstore.driver.PowerStoreDriver
# Backend name
volume_backend_name = <Backend name>
powerstore_nvme = True

驱动程序选项

驱动程序支持以下配置选项

配置选项说明

配置选项 = 默认值

描述

powerstore_nvme = False

(布尔值) 使用 NVMe-OF 连接 PowerStore 卷。

powerstore_ports = []

(字符串列表) 允许的端口。PowerStore iSCSI IP 或 FC WWN(例如 58:cc:f0:98:49:22:07:02)的逗号分隔列表,用于使用。如果未设置该选项,则允许所有端口。

rest_api_call_connect_timeout = 30

(整数(最小值:1))使用此值指定到 PowerStore 后端的 REST API 调用的连接超时值(以秒为单位)。

rest_api_call_read_timeout = 30

(整数(最小值:1))使用此值指定到 PowerStore 后端的 REST API 调用的读取超时值(以秒为单位)。

powerstore_appliances = []

(字符串列表) 设备名称。用于配置卷的 PowerStore 设备名称的逗号分隔列表。已弃用

SSL 支持

要启用 SSL 证书验证,请修改 cinder.conf 文件中的以下选项

driver_ssl_cert_verify = True
driver_ssl_cert_path = <path to the CA>

默认情况下,禁用 SSL 证书验证。

如果省略 driver_ssl_cert_path 选项,将使用系统默认 CA。

镜像卷缓存支持

支持镜像卷缓存功能。要启用它,请修改 cinder.conf 文件中的以下选项

image_volume_cache_enabled = True

默认情况下,禁用镜像卷缓存。

稀疏配置和压缩

驱动程序默认创建稀疏配置压缩卷。不支持厚配置。

CHAP 身份验证支持

驱动程序支持单向(单模式)CHAP 身份验证。要使用 CHAP 身份验证,必须在存储端启用 CHAP 单模式。

注意

启用 CHAP 时,需要使用 CHAP 配置更新所有先前添加的主机,因为这些主机将发生 I/O 中断。建议在将主机添加到集群之前,确定所需的 CHAP 配置类型(如果有)。

CHAP 配置在驱动程序初始化期间从存储中检索,无需额外配置。密钥会自动生成。

复制支持

配置复制

  1. 配对源 PowerStore 系统和目标 PowerStore 系统。

  2. 使用所需的 RPO 创建保护策略和复制规则。

  3. cinder.conf 文件中启用复制。

    要为存储后端启用复制功能,请将 replication_device 设置如下

    ...
    replication_device = backend_id:powerstore_repl_1,
                         san_ip: <Replication system San ip>,
                         san_login: <Replication system San username>,
                         san_password: <Replication system San password>
    
    • 存储后端仅支持一个复制设备。

    • 复制设备支持与主存储后端相同的选项。

  4. 为启用复制的卷创建卷类型。

    $ openstack volume type create powerstore_replicated
    $ openstack volume type set --property replication_enabled='<is> True' powerstore_replicated
    
  5. 为卷类型设置保护策略名称。

    $ openstack volume type set --property powerstore:protection_policy=<protection policy name> \
        powerstore_replicated
    

故障转移主机

发生灾难或需要停机时,管理员可以发出故障转移主机命令

$ cinder failover-host cinder_host@powerstore --backend_id powerstore_repl_1

发出 Cinder failover-host 命令后,Cinder 将切换到配置的复制设备,但是要使现有的实例使用此目标和新的卷路径,首先需要搁置 Nova 实例,然后取消搁置它们,这将有效地重新启动 Nova 实例并重新建立 Nova 实例与卷之间的数据路径。

$ nova shelve <server>
$ nova unshelve [--availability-zone <availability_zone>] <server>

如果主系统可用,管理员可以使用 --backend_id default 启动故障恢复操作

$ cinder failover-host cinder_host@powerstore --backend_id default

一致性组支持

要使用 PowerStore 卷组,请创建启用一致性组快照的组类型。

$ cinder --os-volume-api-version 3.11 group-type-create powerstore_vg
$ cinder --os-volume-api-version 3.11 group-type-key powerstore_vg set consistent_group_snapshot_enabled="<is> True"

注意

目前驱动程序不支持一致性组复制。将卷添加到一致性组和在一致性组中创建卷将失败,如果卷已复制。

QoS(服务质量)支持

注意

QoS 在 PowerStore 版本 4.0 或更高版本中受支持。

PowerStore 驱动程序通过启用以下功能支持服务质量 (QoS)

bandwidth_limit_type

QoS 带宽限制类型。此类型设置确定如何使用 max_iops 和 max_bw 属性。它具有以下两个值

1. Absolute - 限制是指定的绝对值,无论是每秒输入/输出操作数还是带宽。

2. Density - 指定的限制是每 GB,例如每 GB 的每秒输入/输出操作数。

注意

创建 QoS 时,此 (bandwidth_limit_type) 属性是必需的。

max_iops

最大输入/输出操作数,以每秒输入/输出操作数 (IOPS) 或每 GB 的每秒输入/输出操作数计算。类型属性的指定确定使用哪种指标。如果将类型设置为绝对值,则 max_iops 以 IOPS 为单位指定。如果将类型设置为密度,则 max_iops 以每 GB 的 IOPS 为单位指定。如果同时指定了 max_iops 和 max_bw,则系统将在超过任一值时限制 I/O。该值必须在 1 到 2147483646 的范围内。

max_bw

最大 I/O 带宽,以千字节每秒或每 GB 的千字节每秒计算。类型属性的指定确定使用哪种测量单位。如果将类型设置为绝对值,则 max_bw 以千字节每秒为单位指定。如果将类型设置为密度,则 max_bw 以每 GB 的千字节每秒为单位指定。如果同时指定了 max_iops 和 max_bw,则系统将在超过任一值时限制 I/O。该值必须在 2000 到 2147483646 的范围内。

burst_percentage

百分比,指示可以超过限制的程度。如果 I/O 通常在指定的限制以下运行,则卷或卷组将累积突发积分,这些积分可用于在短时间内(几秒钟)超过限制(但不会超过突发限制)。此突发百分比适用于 max_iops 和 max_bw,并且与类型设置无关。该值必须在 0 到 100 的范围内。如果在 QoS 创建期间未指定此属性,则将使用默认值 0。

注意

创建 QoS 时,必须定义 max_iopsmax_bw,或者可以同时定义两者。

$ openstack volume qos create --consumer back-end --property max_iops=100 --property max_bw=50000 --property bandwidth_limit_type=Absolute --property burst_percentage=80 powerstore_qos
$ openstack volume type create --property volume_backend_name=powerstore powerstore
$ openstack volume qos associate powerstore_qos powerstore

注意

在 PowerStore 中更新 QoS 属性有两种方法

  1. 重新定义 :

    这涉及使用不同的 QoS 设置重新定义卷,并将卷迁移到新类型。

  2. 修改 现有 QoS 属性 (推荐)

    此方法包括更改现有的 QoS 属性并创建新的实例或镜像卷,以更新 PowerStore 中的 QoS 策略。这将更新与相同卷类型一起创建的现有附加卷的 QoS 属性。