Cinder 配置必须至少指定以下信息:
要使用 Keystone 验证的授权信息。
要创建的卷类。
此过程中的步骤引用 Cinder 端点服务(而不是 Cinder 或卷节点)的配置。
controller# pkg install cinder
[DEFAULT] qpid_hostname=$CONTROLLER_ADM_NODE rabbit_host=$CONTROLLER_ADM_NODE my_ip=$CONTROLLER_ADM_NODE [database] connection = mysql://cinder:cinder@$CONTROLLER_ADM_NODE/cinder [keystone_authtoken auth_uri = http://$CONTROLLER_ADM_NODE:5000/v2.0 identity_uri = http://$CONTROLLER_ADM_NODE:35357 admin_tenant_name = tenant admin_user = cinder admin_password = service-password
controller# svcadm enable -rs cinder-db controller# svcadm enable -rs cinder-api cinder-scheduler
另请参见
另请参见《How to Build OpenStack Block Storage on ZFS》(《如何在 ZFS 上生成 OpenStack 块存储》)。
Oracle ZFS Storage Appliance iSCSI Cinder 驱动程序允许将 Oracle ZFS Storage Appliance (ZFSSA) 无缝用作 Cinder 的块存储资源。该驱动程序允许创建 iSCSI 卷,这些卷可供 Cinder 服务器向任何通过 Nova 服务实例化的虚拟机分配。该驱动程序通过 cloud/openstack/cinder 软件包提供。您的设备必须至少运行 ZFSSA 软件发行版 2013.1.2.0。
开始之前
在 Oracle ZFS Storage Appliance 上配置一个池。您可以选择使用预先存在的池。
您可以使用现有用户,也可以使用执行 Cinder 驱动程序操作的角色授权创建新的用户。
cinder.akwf 工作流执行以下任务:
如果用户不存在,则创建用户。
设置执行 Cinder 驱动程序操作的角色授权。
如果 RESTful 服务当前处于禁用状态,则启用该服务。
您可以从设备的命令行界面 (Command Line Interface, CLI) 或浏览器用户界面 (Browser User Interface, BUI) 运行该工作流。
zfssa:maintenance workflows> download zfssa:maintenance workflows download (uncommitted)> show Properties: url = (unset) user = (unset) password = (unset) zfssa:maintenance workflows download (uncommitted)> set url="url to the cinder.akwf file" url = "url to the cinder.akwf file" zfssa:maintenance workflows download (uncommitted)> commit Transferred 2.64K of 2.64K (100%) ... done zfssa:maintenance workflows> ls Properties: showhidden = false Workflows: WORKFLOW NAME OWNER SETID ORIGIN VERSION workflow-000 Clear locks root false Oracle Corporation 1.0.0 workflow-001 Configuration for OpenStack Cinder Driver root false Oracle Corporation 1.0.0 zfssa:maintenance workflows> select workflow-001 zfssa:maintenance workflow-001 execute (uncommitted)> set name=openstack name = openstack zfssa:maintenance workflow-001 execute (uncommitted)> set password=openstack-password password = ******** zfssa:maintenance workflow-001 execute (uncommitted)> commit User openstack created.
工作流提示输入用户名和口令。此用户名和口令还将以 san_login 和 san_password 形式用于 cinder.conf 文件。
在 cinder.conf 文件中指定以下必需的属性:
volume_driver-确保取消对 cinder.volume.drivers.zfssa.zfssaiscsi.ZFSSAISCSIDriver 的注释。确保注释掉其他三个选项。
san_ip-ZFSSA 管理主机的名称或 IP 地址。
san_login-ZFSSA 上 Cinder 用户的用户名。
san_password-ZFSSA 上 Cinder 用户的口令。
zfssa_pool-用于分配卷的池。
zfssa_target_portal-ZFSSA iSCSI 目标门户 (data-ip:port)。缺省端口为 3260。
zfssa_project-ZFSSA 项目的名称。如果设备上不存在该项目,则驱动程序会在启动时使用该名称创建一个项目。此项目包含该驱动程序创建的所有卷。提供的其他 ZFSSA 属性用于设置卷特征(例如块大小)和访问(例如启动器、目标、安全性)。
zfssa_initiator_group-启动器组的名称。如果设备上不存在启动器组,则驱动程序会在启动时使用该名称创建一个启动器组。如果您想要使用 default 启动器组,则将此参数的值设置为 default。default 启动器组对于评估可能非常有用。default 启动器组在一般情况下不应使用,因为它可能导致将卷暴露给不需要或冲突的启动器。
zfssa_target_interfaces-ZFSSA iSCSI 目标网络接口。使用下面的命令查看接口:
zfssa:configuration net interfaces> show Interfaces: INTERFACE STATE CLASS LINKS ADDRS LABEL e1000g0 up ip e1000g0 1.10.20.30/24 Untitled Interface
connection-按如下方式设置参数:
connection=mysql://cinder:service-password@controller-fqdn/cinder
如果 ZFSSA iSCSI 服务未处于联机状态,则在设备中使用 BUI 或 CLI 启用该服务。下面的示例说明如何在设备中使用 CLI:
zfssa:> configuration services iscsi zfssa:configuration services iscsi> enable zfssa:configuration services iscsi> show Properties: <status> = online ...
controller# svcadm enable cinder-volume:default cinder-volume:setup