A Cinder volume driver for FreeBSD that stores volumes as ZFS zvols.
- Volume create, delete, extend, clone and revert to snapshot
- Snapshots are ZFS snapshots, with deferred destroy while clones depend on them
- Glance image download to a volume and volume upload to an image
- Local attach to a nova-bhyve instance on the same host
- Remote iSCSI volume export served by CTL, attached on FreeBSD hosts with os-brick-freebsd
- Sparse or fully reserved zvols on disk
- Volume migration between two ZFS backends, using
zfs sendover ssh when the destination is another host
- Snapshot export over iSCSI
- Per-initiator ACLs, mutual CHAP and multipath portals
- Add support for NVMe over Fabrics remote attach
- Remote snapshot connections are refused
zfs allow delegation is needed for the dataset holding volumes, including send and receive for migration.
Remote export needs ctld running against the driver's config file:
touch /etc/ctl.conf
sysrc ctld_flags="-f /var/db/cinder/ctl.conf" ctld_enable=YES
service ctld start[zfs]
volume_driver = cinder_zfs_driver.driver.ZFSVolumeDriver
volume_backend_name = ZFS
zfs_dataset = zroot/cinder
zfs_sparse_volumes = true
use_chap_auth = true
# zfs_ctld_config = /var/db/cinder/ctl.conf
# zfs_local_hosts = alias1,alias2
# migration_ssh_config = /usr/local/etc/cinder/ssh_configTo migrate volumes to a backend on another host, the cinder user needs an ssh key.
See the migration_ssh_config configuration opt.
The user on the receiving host needs create,destroy,mount,receive,refreservation delegated on the dataset.
Additionally you can lock down this user to only execute the receive command, for example (in authorized_keys):
command="cinder-zfs-receive --config-file /path/to/cinder.conf",restrict ssh-ed25519 AAAA...