ZFS (on Linux) driver¶
Manila ZFSonLinux share driver uses ZFS file system for exporting NFS shares. Written and tested using Linux version of ZFS.
Requirements¶
- NFS daemon that can be handled through - exportfsapp.
- ZFS file system packages, either Kernel or FUSE versions. 
- ZFS zpools that are going to be used by Manila should exist and be configured as desired. Manila will not change zpool configuration. 
- For remote ZFS hosts according to manila-share service host SSH should be installed. 
- For ZFS hosts that support replication: - SSH access for each other should be passwordless. 
- Service IP addresses should be available by ZFS hosts for each other. 
 
Possibilities¶
- Any amount of ZFS zpools can be used by share driver. 
- Allowed to configure default options for ZFS datasets that are used for share creation. 
- Any amount of nested datasets is allowed to be used. 
- All share replicas are read-only, only active one is read-write. 
- All share replicas are synchronized periodically, not continuously. Status - in_syncmeans latest sync was successful. Time range between syncs equals to the value of the- replica_state_update_intervalconfiguration global option.
- Driver can use qualified extra spec - zfsonlinux:compression. It can contain any value that ZFS app supports. But if it is disabled through the configuration option with the value- compression=off, then it will not be used.
Restrictions¶
The ZFSonLinux share driver has the following restrictions:
- Only IP access type is supported for NFS. 
- Only FLAT network is supported. 
- Promote share replicaoperation will switch roles of current- secondaryreplica and- active. It does not make more than one active replica available.
- The below items are not yet implemented: - SaMBabased sharing.
- Thick provisioningcapability.
 
Known problems¶
- Promote share replicaoperation will make ZFS file system that became secondary as RO only on NFS level. On ZFS level system will stay mounted as was - RW.
Back-end configuration¶
The following parameters need to be configured in the manila configuration file for back-ends that use the ZFSonLinux driver:
- share_driver= manila.share.drivers.zfsonlinux.driver.ZFSonLinuxShareDriver
- driver_handles_share_servers= False
- replication_domain= custom_str_value_as_domain_name- If empty, then replication will be disabled. 
- If set, then will be able to be used as replication peer for other back ends with the same value. 
 
- zfs_share_export_ip= <user_facing IP address of ZFS host>
- zfs_service_ip= <IP address of service network interface of ZFS host>
- zfs_zpool_list= zpoolname1,zpoolname2/nested_dataset_for_zpool2- Can be one or more zpools. 
- Can contain nested datasets. 
 
- zfs_dataset_creation_options= <list of ZFS dataset options>- readonly, quota, sharenfs and sharesmb options will be ignored. 
 
- zfs_dataset_name_prefix= <prefix>- Prefix to be used in each dataset name. 
 
- zfs_dataset_snapshot_name_prefix= <prefix>- Prefix to be used in each dataset snapshot name. 
 
- zfs_use_ssh= <boolean_value>- Set - Falseif ZFS located on the same host as manila-share service.
- Set - Trueif manila-share service should use SSH for ZFS configuration.
 
- zfs_ssh_username= <ssh_username>- Required for replication operations. 
- Required for SSH``ing to ZFS host if - zfs_use_sshis set to- True.
 
- zfs_ssh_user_password= <ssh_user_password>- Password for - zfs_ssh_usernameof ZFS host.
- Used only if - zfs_use_sshis set to- True.
 
- zfs_ssh_private_key_path= <path_to_private_ssh_key>- Used only if - zfs_use_sshis set to- True.
 
- zfs_share_helpers= NFS=manila.share.drivers.zfsonlinux.utils.NFSviaZFSHelper- Approach for setting up helpers is similar to various other share drivers. 
- At least one helper should be used. 
 
- zfs_replica_snapshot_prefix= <prefix>- Prefix to be used in dataset snapshot names that are created by - update replicaoperation.
 
Driver options¶
| Configuration option = Default value | Description | 
|---|---|
| [DEFAULT] | |
| 
 | (List) Define here list of options that should be applied for each dataset creation if needed. Example: compression=gzip,dedup=off. Note that, for secondary replicas option ‘readonly’ will be set to ‘on’ and for active replicas to ‘off’ in any way. Also, ‘quota’ will be equal to share size. Optional. | 
| 
 | (String) Prefix to be used in each dataset name. Optional. | 
| 
 | (String) Prefix to be used in each dataset snapshot name. Optional. | 
| 
 | (String) Set snapshot prefix for usage in ZFS migration. Required. | 
| 
 | (String) Set snapshot prefix for usage in ZFS replication. Required. | 
| 
 | (String) IP to be added to admin-facing export location. Required. | 
| 
 | (String) IP to be added to user-facing export location. Required. | 
| 
 | (List) Specify list of share export helpers for ZFS storage. It should look like following: ‘FOO_protocol=foo.FooClass,BAR_protocol=bar.BarClass’. Required. | 
| 
 | (String) Path to SSH private key that should be used for SSH’ing ZFS storage host. Not used for replication operations. Optional. | 
| 
 | (String) Password for user that is used for SSH’ing ZFS storage host. Not used for replication operations. They require passwordless SSH access. Optional. | 
| 
 | (String) SSH user that will be used in 2 cases: 1) By manila-share service in case it is located on different host than its ZFS storage. 2) By manila-share services with other ZFS backends that perform replication. It is expected that SSH’ing will be key-based, passwordless. This user should be passwordless sudoer. Optional. | 
| 
 | (Boolean) Remote ZFS storage hostname that should be used for SSH’ing. Optional. | 
| 
 | (List) Specify list of zpools that are allowed to be used by backend. Can contain nested datasets. Examples: Without nested dataset: ‘zpool_name’. With nested dataset: ‘zpool_name/nested_dataset_name’. Required. | 
