The Cinder deployment described in this section applies to a Juno setup that is running the Oracle Solaris 11.3 SRU 2 or later releases.
In previous OpenStack releases without SAN support, the Cinder volume service had to be configured to run on the target host if the ZFS iSCSI driver is used.
With support for storage area networks (SAN) in Cinder, you can use SSH to configure multiple storage host backends and define the volume type of these hosts that would determine how they are used. In this type of deployment, the Cinder package as well as all of the Cinder services would be installed only on the initiator host, which typically is the host that also functions as the Compute node.
You do not need to install the OpenStack package on the remote target hosts. These hosts merely provide the LUN disks to the initiator host based on COMSTAR.
Properly deploying remote systems for storage has the following requirements:
Configuring the /etc/cinder/cinder.conf file.
Granting the appropriate rights profile to the designated user.
Manually installing additional packages.
The following sections discuss these requirements in detail.
After installing the Cinder package on the initiator host, edit the [DEFAULT] section of the /etc/cinder/cinder.conf file.
Refer to the following example as a guide to understand the definitions in the configuration file.
[DEFAULT] my_ip = localhost osapi_volume_workers = 1 auth_strategy = keystone #num_volume_device_scan_tries = 6 os-volume-api-version = 2 scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler enabled_backends=zfsdriver-1, zfsdriver-2, zfsdriver-3, zfsdriver-4, zfsdriver-5 [zfsdriver-1] volume_group=zvolumes-1 volume_driver=cinder.volume.drivers.solaris.zfs.ZFSVolumeDriver volume_backend_name=ZFS_LOCAL zfs_volume_base = rpool/cinder san_is_local = True debug=true verbose=true [zfsdriver-2] volume_group=zvolumes-2 volume_driver=cinder.volume.drivers.solaris.zfs.ZFSISCSIDriver volume_backend_name=ZFS_REMOTE zfs_volume_base = rpool/cinder san_ip = 10.134.13.38 san_login = jdoe san_password = password debug=true verbose=true [zfsdriver-3] volume_group=zvolumes-3 volume_driver=cinder.volume.drivers.solaris.zfs.ZFSFCDriver volume_backend_name=ZFS_REMOTE_FC zfs_volume_base = rpool/fc san_ip = 10.134.13.38 san_login = jdoe san_password = password debug=true verbose=true [zfsdriver-4] volume_group=zvolumes-4 volume_driver=cinder.volume.drivers.solaris.zfs.ZFSISCSIDriver volume_backend_name=ZFS_REMOTE zfs_volume_base = rpool/cinder/zq san_ip = 10.134.13.38 san_login = jdoe san_password = password debug=true verbose=true [zfsdriver-5] volume_group=zvolumes-5 volume_driver=cinder.volume.drivers.solaris.zfs.ZFSISCSIDriver volume_backend_name=ZFS_REMOTE zfs_volume_base = rpool/zq san_ip = 10.134.63.182 san_login = jdoe san_password = password debug=true verbose=true
Lists the enabled backend hosts. In this example, 5 backend hosts are defined.
The backend hosts use 3 ZFS drivers (ZFSVolumeDriver, ZFSISCSIDriver, ZFSFCDriver) on 3 hosts. Of these hosts, one is local (localhost) while the others are remote (10.134.13.38 and 10.134.63.182).
Defines a volume type with the specified name. The following sample commands perform these actions, respectively:
# cinder type-create type-remote # cinder type-key type-remote set volume_backend_name=ZFS_REMOTE # cinder create --display-name t1 --volume-type type-remote
In the previous example, each command performs the following actions:
Creates a new volume type.
Assigns the backend name to the new volume type.
Creates a new volume based on the new volume type.
After you run the last command, the new volume t1 is created on one of backends with the name ZFS_REMOTE based on the filtering rules.
Specifies the base dataset for new ZFS volumes on each volume backend.
Because all of the ZFS drivers are based on the SAN driver, you must set the san_* parameters.
Commands are executed on a backend host either locally or remotely with SSH. Thus, for each backend, you either set san_is_local = True or configure san_ip* parameters, but not both.
Optional parameters for debugging. You can omit configuring these parameters.
After correctly configuring Cinder, listing the services displays each service state.
# cinder service-list +------------+--------------+------+---------+-------+--------------------+----------+ | Binary | Host | Zone | Status | State | Updated_at | Disabled | | | | | | | | Reason | +------------+--------------+------+---------+-------+--------------------+----------+ | cinder- | | | | | 2015-10-13 | | | backup | host-2 | nova | enabled | up | T19:22:45.000000 | None | | | | | | | | | | cinder- | | | | | 2015-10-13 | | | scheduler | host-2 | nova | enabled | up | T19:22:43.000000 | None | | | | | | | | | | cinder- | | | | | 2015-10-13 | | | volume | host-2 | nova | enabled | down | T18:31:41.000000 | None | | | | | | | | | | cinder- | host-2 | | | | 2015-10-13 | | | volume | @zfsdriver-1 | nova | enabled | up | T19:22:46.000000 | None | | | | | | | | | | cinder- | host-2 | | | | 2015-10-13 | | | volume | @zfsdriver-2 | nova | enabled | up | T19:22:47.000000 | None | | | | | | | | | | cinder- | host-2 | | | | 2015-10-13 | | | volume | @zfsdriver-3 | nova | enabled | up | T19:22:48.000000 | None | | | | | | | | | | cinder- | host-2 | | | | 2015-10-13 | | | volume | @zfsdriver-4 | nova | enabled | up | T19:22:47.000000 | None | | | | | | | | | | cinder- | host-2 | | | | 2015-10-13 | | | volume | @zfsdriver-5 | nova | enabled | up | T19:22:48.000000 | None | | | | | | | | | | cinder- | host-2 | | | | 2015-10-13 | | | volume | @zfsdriver-6 | nova | enabled | down | T18:32:55.000000 | None | +------------+--------------+------+---------+-------+--------------------+----------+
To enable the user defined by san_login to use the remote targets, the user must be granted a proper rights profile. The following example shows how to create the rights profile for the user.
# useradd -s /usr/bin/pfbash -m jdoe # passwd jdoe password # profiles -p "Cinder Storage management" profiles:Cinder Storage management> set desc="Cinder Storage management on target host" profiles:Cinder Storage management> add profiles="File System Management" profiles:Cinder Storage management> add auths="solaris.smf.modify.stmf" profiles:Cinder Storage management> add cmd=/usr/sbin/itadm profiles:Cinder Storage management:itadm> set euid=0 profiles:Cinder Storage management:itadm> end profiles:Cinder Storage management> add cmd=/usr/sbin/stmfadm profiles:Cinder Storage management:stmfadm> set euid=0 profiles:Cinder Storage management:stmfadm> end profiles:Cinder Storage management> add cmd=/usr/sbin/zfs profiles:Cinder Storage management:zfs> set priv=sys_config,sys_mount profiles:Cinder Storage management:zfs> end profiles:Cinder Storage management> exit # usermod -P "Cinder Storage management" jdoe
For more information about profiles and rights, refer to Securing Users and Processes in Oracle Solaris 11.3.
To enable the remote host as a target, perform the following steps on the remote host:
Install the package group/feature/storage-server on the remote host.
# pkg install storage-server
Enable the following services on the host:
svc:/system/stmf:default
svc:/network/iscsi/target:default
For example:
remote-host# svcadm enable stmf remote-host# svcadm enable -r svc:/network/iscsi/target:default
Initialize and set up the Access Control List (ACL) for the defined zfs_volume_base.
For example, suppose that you have the definition zfs_volume_base=rpool/fc in the configuration file. Then you must run the following commands:
# chmod A+user:cinder:add_subdirectory:allow /rpool/fc # zfs allow cinder clone,create,destroy,mount,snapshot rpool/fc