iSCSI Driver
jumpstarter-driver-iscsi provides a lightweight iSCSI target implementation powered by the Linux
RFC-tgt framework via the
rtslib-fb Python bindings.
⚠️ The driver creates and manages an iSCSI target (server). To access the exported LUNs you still need a separate iSCSI initiator (client) on the machine running your test-code / DUT.
Installation
rtslib-fb relies on the in-kernel LIO target framework which is packaged
differently by each distribution. You should be able to run sudo targetcli
without errors before you start the Jumpstarter driver.
Fedora:
$ sudo dnf install targetcli python3-rtslib
Finally, install the driver itself from the Jumpstarter package index:
:substitutions:
$ pip3 install --extra-index-url {{index_url}} jumpstarter-driver-iscsi
Configuration
The driver is configured through the exporter YAML file. A minimal example
exports the local file disk.img as a 5 GiB LUN:
export:
iscsi:
type: jumpstarter_driver_iscsi.driver.ISCSI
config:
root_dir: "/var/lib/iscsi"
target_name: "demo"
remove_created_on_close: false # Keep disk images persistent (default)
block_device_allowlist: # Required to use is_block=True LUNs
- /dev/sda
- /dev/disk/by-id/my-disk
# When size_mb is 0 a pre-existing file size is used.
Config parameters
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
root_dir |
Directory where image files will be stored | str | no | /var/lib/iscsi |
iqn_prefix |
IQN prefix to use when building the target IQN | str | no | iqn.2024-06.dev.jumpstarter |
target_name |
The target name appended to the IQN prefix | str | no | target1 |
host |
IP address to bind the target to. Empty string will auto-detect | str | no | auto |
port |
TCP port the target listens on | int | no | 3260 |
remove_created_on_close |
Automatically remove created files/directories when driver closes | bool | no | false |
block_device_allowlist |
List of allowed block device paths for is_block=True LUNs. Symlinks are resolved before matching. Must be set to use block devices. |
list[str] | no | [] (empty - block devices disabled) |
File Management
The iSCSI server driver automatically tracks disk image files and directories created during the session. By default, remove_created_on_close is set to false to preserve disk images that are typically reused across test sessions. Set to true if you want temporary disk images to be cleaned up automatically.
API Reference
.. autoclass:: jumpstarter_driver_iscsi.client.ISCSIServerClient()
:members: start, stop, get_host, get_port, get_target_iqn, add_lun, remove_lun, list_luns, upload_image
Release files for jumpstarter-driver-iscsi 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jumpstarter_driver_iscsi-0.9.0.tar.gz | 13.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jumpstarter_driver_iscsi-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / jumpstarter_driver_iscsi-0.9.0.tar.gz
| Download URL | jumpstarter_driver_iscsi-0.9.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b1287499a2049f841754fd4bb02d63138d5d9e2b7d03c93fd2c75182421c756
|
|
BLAKE2b-256 checksum How to use checksums |
e729a1e7faa7034b650aa0338af782db616dfd4847eb41c0d5c7b81afaf3d1b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / jumpstarter_driver_iscsi-0.9.0-py3-none-any.whl
| Download URL | jumpstarter_driver_iscsi-0.9.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ca16234dd19926769854d7495afec853766ed26d6045e960ef3895246e2ccbc
|
|
BLAKE2b-256 checksum How to use checksums |
2c1212526a25dc1e594b4ba30b5b0f41c6a01672a60ee362b8aaf5eae0c169fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|