Installation
← Older revision | Revision as of 13:49, 7 August 2023 | ||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The Linux target framework (tgt) is a user space SCSI target framework that supports the iSCSI and iSER transport protocols and that supports multiple methods for accessing block storage. tgt consists of user-space daemon and tools. Being a user space server, it does not require a kernel module to run. In Alpine Linux, the package is called {{pkg|scsi-tgt}} | The Linux target framework (tgt) is a user space SCSI target framework that supports the iSCSI and iSER transport protocols and that supports multiple methods for accessing block storage. tgt consists of user-space daemon and tools. Being a user space server, it does not require a kernel module to run. In Alpine Linux, the package is called {{pkg|scsi-tgt}} | ||
== | == Installation == | ||
I Alpine, {{ic|scsi-tgt}} is split over several packages: | |||
# apk add scsi-tgt scsi-tgt-scripts | * {{pkg|scsi-tgt}} - the tgtd daemon. | ||
* {{pkg|scsi-tgt-scripts}} - tgt-admin helper utility. Makes it easier to configure targets via config files. | |||
* {{pkg|scsi-tgt-doc}} - documentation, man pages and example configurations. | |||
* {{pkg|scsi-tgt-openrc}} - init scripts for runnit tgt as a service. | |||
Only {{pkg|scsi-tgt}} is required to run the tgt target daemon. A running daemon can be configured with {{ic|tgtadm}} command line tool. However, if you want to use configuration files you need the {{ic|tgt-admin}} helper tool, which reads the config and emits appropriate {{ic|tgtadm}} commands. The tgt-admin tool is written in perl, and so depends on perl being installed, which is why we have it as a separate package. | |||
This guide assumes that you want to configure iSCSI targets via a configuration file, and have it automatically start during boot. | |||
To install scsi-tgt and the utilities to configure tgt: | |||
# apk add scsi-tgt scsi-tgt-scripts scsi-tgt-openrc | |||
{{note|Note that without setting up the configuration file {{ic|/etc/tgt/targets.conf}} first, the {{ic|tgtd}} daemon will run with an empty configuration}} | |||
Once you have editited the configuration file, you can activate the service with | |||
# rc-update add tgt-admin | # rc-update add tgt-admin | ||
# service tgt-admin start | # service tgt-admin start | ||
=== Sample configuration === | === Sample configuration === | ||
Line 48: | Line 60: | ||
</backing-store> | </backing-store> | ||
</target> | </target> | ||
== tgt-admin == | == tgt-admin == |
Distro