Академический Документы
Профессиональный Документы
Культура Документы
What is iscsi ?
ISCSI, which stands for Internet Small Computer System Interface
ISCSI is an Internet Protocol based storage networking standard for linking data storage
facilities. By carrying SCSI commands over IP networks, iSCSI can facilitate data transfers
over local area networks (LANs), wide area networks (WANs), or the Internet. Through iSCSI,
the space on storage server will be regarded as local disks by client's operation system. But in
reality, all data transferred to the disk are actually transferred over network to the storage
server.
To start using targetcli, run targetcli and to get a layout of the tree interface,
run ls:
[root@apache ~]# targetcli
Warning: Could not load preferences file /root/.targetcli/prefs.bin.
targetcli shell version 2.1.fb34
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> 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]
/>
To create a fileio storage object, run the command in backstores/fileio
/> cd backstores/fileio/
/backstores/fileio> create test /tmp/taashee.img 200m
Created fileio test with size 209715200
/backstores/fileio> create lv /dev/vg_iscsi/lv_iscsi
Note: block backstore preferred for best results
Created fileio lv with size 9663676416
Create an iscsi target :
Move into /iscsi and run create command for default target name
/> cd iscsi
/iscsi> create
Created target iqn.2003-01.org.linux-iscsi.apache.x8664:sn.4fa62d024441.
Created TPG 1.
Create an iscsi portal :
Move into portal and run create command
/iscsi> cd iqn.2003-01.org.linux-iscsi.apache.x8664:sn.4fa62d024441/tpg1/portals
/iscsi/iqn.20.../tpg1/portals> create
Using default IP port 3260
Binding to INADDR_ANY (0.0.0.0)
Created network portal 0.0.0.0:3260.
State
iscsi.storage.x8664:sn.4fa62d024441 -p 192.168.3.137:3260 -l
Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.storage.x8664:sn.4fa62d024441,
portal: 192.168.3.137,3260] (multiple)
Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.storage.x8664:sn.4fa62d024441, portal:
192.168.3.137,3260] successful.
iscsi.storage.x8664:sn.4fa62d024441 -p 192.168.3.137:3260 -l
Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.storage.x8664:sn.4fa62d024441,
portal: 192.168.3.137,3260] (multiple)
Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.storage.x8664:sn.4fa62d024441, portal:
192.168.3.137,3260] successful.