On the server, use targetcli
and the target
service to run an iscsi server
This will create a 100MB LUN that can be connected to a client/initiator and used read/write without authentication. The backing file will be created as sparse. Derived from https://www.mankier.com/8/targetcli#Quickstart and https://github.com/oVirt/vdsm/blob/master/contrib/target.
$ sudo systemctl enable --now target.service
$ sudo targetcli
/> cd /backstores/fileio/
/backstores/fileio/> create test /tmp/test.img 100m