You are not allowed to add pages
This is an old revision of the document!
list # iscsiadm -m node logout all # iscsiadm -m node -U all session # iscsiadm -m session # iscsiadm -m session -P 3
yum install targetcli systemctl status target systemctl enable target targetcli /> ls o- / ......................................................................................................................... [...] o- backstores .............................................................................................................. [...] | o- block .................................................................................................. [Storage Objects: 0] | o- fileio ................................................................................................. [Storage Objects: 0] | o- pscsi .................................................................................................. [Storage Objects: 0] | o- ramdisk ................................................................................................ [Storage Objects: 0] o- iscsi ............................................................................................................ [Targets: 0] o- loopback ......................................................................................................... [Targets: 0]
FILEIO (Linux file-backed storage) write_back and write_thru
/> /backstores/fileio create file1 /home/tgt/disk1.img 100G write_back=false
Created fileio file1 with size 107374182400
/> ls /backstores/fileio/
o- fileio ..................................................................................................... [Storage Objects: 1]
o- file1 ................................................................. [/home/tgt/disk1.img (100.0GiB) write-thru deactivated]
o- alua ....................................................................................................... [ALUA Groups: 1]
o- default_tg_pt_gp ........................................................................... [ALUA state: Active/optimized]
BLOCK (Linux BLOCK devices)
/> /backstores/block create name=block1 dev=/dev/sdb
Generating a wwn serial.
Created block storage object block_backend using /dev/sdb.
PSCSI(Linux pass-through SCSI devices)
RAMDISK(Linux RAMDISK_MCP)
/> iscsi/
/iscsi> create iqn.2015-02.oracle.boot:uefi
Created target iqn.2015-02.oracle.boot:uefi.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/iscsi> ls
o- iscsi .............................................................................................................. [Targets: 1]
o- iqn.2015-02.oracle.boot:uefi ........................................................................................ [TPGs: 1]
o- tpg1 ................................................................................................. [no-gen-acls, no-auth]
o- acls ............................................................................................................ [ACLs: 0]
o- luns ............................................................................................................ [LUNs: 0]
o- portals ...................................................................................................... [Portals: 1]
o- 0.0.0.0:3260 ....................................................................................................... [OK]
# create a portal /iscsi> /> /iscsi/iqn.2015-02.oracle.boot:uefi/tpg1/portals /iscsi/iqn.20../tpg1/portals> create # delete a portal /iscsi/iqn.20.../tpg1/portals/delete ip_address=0.0.0.0 ip_port=3260
/> iscsi/iqn.2015-02.oracle.boot:uefi/tpg1/luns/ /iscsi/iqn.20...efi/tpg1/luns> create /backstores/fileio/file1 Created LUN 0.