# create a directory
root@dlp:~# mkdir /var/iscsi_disks# enter the admin console
root@dlp:~# targetcli
targetcli 3.0.pre4.1~ga55d018 (rtslib 3.0.pre4.1~g1b33ceb)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.
/>cd backstores/fileio
# create a disk-image with the name "disk01" on /var/iscsi_disks/disk01.img with 10G
/backstores/fileio> create disk01 /var/iscsi_disks/disk01.img 10G
Using buffered mode.
Created fileio disk01.
/backstores/fileio>cd /iscsi
# create a target
/iscsi> create iqn.2016-04.world.srv:storage.target00
Created target iqn.2016-04.world.srv:storage.target00.
Selected TPG Tag 1.
Created TPG 1.
# set portal (set IP address to listen)
/iscsi>cd iqn.2016-04.world.srv:storage.target00/tpg1/portals
/iscsi/iqn.20.../tpg1/portals> create 0.0.0.0
Using default IP port 3260
Created network portal 0.0.0.0:3260.
/iscsi/iqn.20.../tpg1/portals>c