targetd.yaml - Man Page

configuration file

Description

targetd.yaml is the configuration file for the targetd service.

Configuration

targetd uses /etc/target/targetd.yaml for configuration. It is in YAML format. targetd currently uses scalar values and collection values, see example for details.

Configuration File Settings

block_pools
Sets the LVM Volume Group(s) that targetd will use to allocate volumes. Defaults to ["vg-targetd"].

Alternatively, targetd can allocate thinp (thin-provisioned) volumes out of a thinpool LV. These should be listed as "<vgname>/<poolname>", with the VG and thinpool LV names separated by a "/". These should already be created; targetd will not create VGs or thinpool LVs.

If you want to use ZFS exclusively, this should be set as empty list.

zfs_block_pools
Sets the ZFS parent dataset(s) that targetd will use to allocate volumes. Defaults to empty list.

This should be list of already existing zfs filesystem datasets. It cannot contain any two datasets which are in parent-child relationship, like "tank/ds" and "tank/ds/ds2".

Using ZFS requires zfs binary to be accessible. Cannot contain colons even though it's supported by ZFS itself.

zfs_enable_copy
Enables copy method on ZFS volumes. Warning: copying ZFS volumes will make source volumes unable to be deleted as long as copies exist. This is due to ZFS snapshot/clone limitations.

fs_pools
Sets the mount point(s) that targetd will use to export filesystems over NFS. Defaults to none.

user
password
Sets the username and password required to use the remote API. "user" defaults to admin, but password must be set prior to using targetd.

target_name
Sets the iSCSI target name that targetd will use. Default is iqn.2003-01.org.linux-iscsi.<hostname>:targetd.

log_level
Set the daemon logging verbosity.  Select one of the following: debug, info, warning, error, critical.  Defaults to "info".

ssl
ssl_key
ssl_cert
Settings for enabling SSL/TLS encryption. ssl defaults to off. If enabled, it will default to looking for key and cert files named targetd_key.pem and targetd_cert.pem in /etc/target. These paths may also be specified, using the ssl_key and ssl_cert config settings.

Key and self-signed cert may be generated using openssl:

openssl genrsa -out targetd_key.pem 2048
openssl req -new -x509 -key targetd_key.pem -out targetd_cert.pem -days 9999

See Also

targetd(8), targetcli(8), lvm(8), lsmcli(8)

Authors

Written by Andy Grover <andy@groveronline.com> and
Tony Asleson <tasleson@redhat.com>.

Reporting Bugs

Report bugs via <targetd-devel@lists.fedorahosted.org>
or <https://github.com/open-iscsi/targetd/issues>