Erinevus lehekülje "LIO iSCSI target" redaktsioonide vahel

Allikas: Kuutõrvaja
 
(ei näidata sama kasutaja 10 vahepealset redaktsiooni)
2. rida: 2. rida:
  
 
* http://linux-iscsi.org/wiki/Main_Page
 
* http://linux-iscsi.org/wiki/Main_Page
 +
 +
* http://www.linux-iscsi.org/index.php/LIO-Target
  
 
* http://www.youtube.com/watch?v=zSyybHxuT68 demovideo, mis LIO-t kasutades HA-iSCSI klastri kokku paneb (kasutades selleks küll spets distrot - RTS OS): RTS veebi ja Wikipedia järgi tundub, et videos nähtud lahenduses kasutati DRBD ja Pacemakerit HA tekitamiseks.
 
* http://www.youtube.com/watch?v=zSyybHxuT68 demovideo, mis LIO-t kasutades HA-iSCSI klastri kokku paneb (kasutades selleks küll spets distrot - RTS OS): RTS veebi ja Wikipedia järgi tundub, et videos nähtud lahenduses kasutati DRBD ja Pacemakerit HA tekitamiseks.
 +
Compared to iET, LIO is implemented as a pure kernel driver.  Operations for LIO is done via configFS special filesystem.
 +
 +
*targetcli - provides targetcli command-line utility.  This is the standard way to manipulate LIO.
 +
*python-rtslib provides rtslib, a full-fledged python API library over configFS.
 +
 +
Fabric - LIO supports several other fabrics than iSCSI.
 +
Look for /var/target/fabric/ directory for available fabric specifications.
  
 +
Backstores - LIO supports several storage types as backing storage for LUNs.
 +
Specifically, PSCSI passes SCSI commands through to a (real) SCSI device.
 +
IBLOCK emulates SCSI devices on top of block devices such as LVM logical volume.
  
 +
===Paigaldamine Ubuntu/Debian keskkonnas.===
  
Before LIO, the iSCSI target implementation in Ubuntu was iET. Compared to iET, LIO is implemented as a pure kernel driver. Operations for LIO is done via configFS special filesystem.
+
  $ sudo apt-get install --no-install-recommends targetcli python-urwid
 +
  $ sudo reboot
  
 +
===Paigaldamine Gentoos===
  
These packages are related to LIO:
+
The important kernel modules are target_core_mod and iscsi_target_mod, which should be in the kernel and loaded automatically.
targetcli
 
provides targetcli command-line utility.  This is the standard way to manipulate LIO.
 
python-rtslib
 
provides rtslib, a full-fledged python API library over configFS.
 
  
 +
# emerge sys-block/targetcli
  
Concepts
+
Käivitamiseks
In addition to the standard iSCSI concepts, you should know some LIO specific ones.
+
 
For the standard concepts, read RFC3720.
+
/etc/init.d/target start
Fabric
+
 
LIO supports several other fabrics than iSCSI.
+
===Kasutamine===
Look for /var/target/fabric/ directory for available fabric specifications.
 
Backstores
 
LIO supports several storage types as backing storage for LUNs.
 
Specifically, PSCSI passes SCSI commands through to a (real) SCSI device.
 
IBLOCK emulates SCSI devices on top of block devices such as LVM logical volume.
 
  
$ sudo apt-get install --no-install-recommends targetcli python-urwid
+
$ targetcli
$ sudo reboot
+
Welcome to the targetcli shell:
 +
/> ls
 +
o- / ..................................................................... [...]
 +
  o- backstores .......................................................... [...]
 +
  | o- fileio ............................................... [0 Storage Object]
 +
  | o- iblock ............................................... [0 Storage Object]
 +
  | o- pscsi ................................................ [0 Storage Object]
 +
  | o- rd_dr ................................................ [0 Storage Object]
 +
  | o- rd_mcp ............................................... [0 Storage Object]
 +
  o- ib_srpt ........................................................ [0 Target]
 +
  o- iscsi .......................................................... [0 Target]
 +
  o- loopback ....................................................... [0 Target]
 +
  o- qla2xxx ........................................................ [0 Target]
 +
/>
  
  
$ targetcli
+
Then I configure tcm_loop and use blockio to setup the arrays to be accessible by lio-target. /dev/cciss/c0d0 is a HP MSA20 Storage Array disk array. If this were just a normal scsi disk you’d simply put /dev/sdb or so the like.
Welcome to the targetcli shell:
 
  
  Copyright (c) 2012 by RisingTide Systems LLC.
+
  # tcm_node –block iblock_0/array1 /dev/cciss/c0d0
All rights reserved.
 
  
Visit us at http://www.risingtidesystems.com.
+
Now we configure lio, setup the LUNs, setup the Target Portals and setup LUN ACLs for security, and finally enable the portals. I’ve changed iqns and IPs below for my own privacy. 192.168.0.1 would be the IP of the iSCSI server/target itself.
  
Using loopback fabric module.
+
# lio_node –addlun iqn.2010.com.stephenwagner.iscsi:array1 1 0 iscsi00 iblock_0/array1
Using iscsi fabric module.
+
# lio_node –addnp iqn.2010.com.stephenwagner.iscsi:array1 1 192.168.0.1:3260
Using ib_srpt fabric module.
+
# lio_node –disableauth iqn.2010.com.stephenwagner.iscsi:array1 1
Using qla2xxx fabric module.
+
# lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array1 1 iqn.1998-01.com.vmware:esx02 0 0
 +
# lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array1 1
  
/> ls
+
*http://www.linux-iscsi.org/wiki/RTSadmin RTSadmin manual.
o- / ..................................................................... [...]
 
  o- backstores .......................................................... [...]
 
  | o- fileio ............................................... [0 Storage Object]
 
  | o- iblock ............................................... [0 Storage Object]
 
  | o- pscsi ................................................ [0 Storage Object]
 
  | o- rd_dr ................................................ [0 Storage Object]
 
  | o- rd_mcp ............................................... [0 Storage Object]
 
  o- ib_srpt ........................................................ [0 Target]
 
  o- iscsi .......................................................... [0 Target]
 
  o- loopback ....................................................... [0 Target]
 
  o- qla2xxx ........................................................ [0 Target]
 
/>
 
  
 +
*https://wiki.archlinux.org/index.php/ISCSI_Target
  
http://www.linux-iscsi.org/wiki/RTSadmin
+
*http://www.linuxclustering.net/category/storage/iscsi/

Viimane redaktsioon: 21. oktoober 2013, kell 21:53

Wikipedia andmeil tundub LIO olevat upstream kernelis sees juba miskist 2010. aastast ja projekti enda lehel on väidetud, et alates 2.6.38-st on LIO Linuxi standardne iSCSI target (STGT asemel).

  • http://www.youtube.com/watch?v=zSyybHxuT68 demovideo, mis LIO-t kasutades HA-iSCSI klastri kokku paneb (kasutades selleks küll spets distrot - RTS OS): RTS veebi ja Wikipedia järgi tundub, et videos nähtud lahenduses kasutati DRBD ja Pacemakerit HA tekitamiseks.

Compared to iET, LIO is implemented as a pure kernel driver. Operations for LIO is done via configFS special filesystem.

  • targetcli - provides targetcli command-line utility. This is the standard way to manipulate LIO.
  • python-rtslib provides rtslib, a full-fledged python API library over configFS.

Fabric - LIO supports several other fabrics than iSCSI. Look for /var/target/fabric/ directory for available fabric specifications.

Backstores - LIO supports several storage types as backing storage for LUNs. Specifically, PSCSI passes SCSI commands through to a (real) SCSI device. IBLOCK emulates SCSI devices on top of block devices such as LVM logical volume.

Paigaldamine Ubuntu/Debian keskkonnas.

$ sudo apt-get install --no-install-recommends targetcli python-urwid
$ sudo reboot

Paigaldamine Gentoos

The important kernel modules are target_core_mod and iscsi_target_mod, which should be in the kernel and loaded automatically.

# emerge sys-block/targetcli

Käivitamiseks

/etc/init.d/target start

Kasutamine

$ targetcli
Welcome to the targetcli shell:
/> ls
o- / ..................................................................... [...]
  o- backstores .......................................................... [...]
  | o- fileio ............................................... [0 Storage Object]
  | o- iblock ............................................... [0 Storage Object]
  | o- pscsi ................................................ [0 Storage Object]
  | o- rd_dr ................................................ [0 Storage Object]
  | o- rd_mcp ............................................... [0 Storage Object]
  o- ib_srpt ........................................................ [0 Target]
  o- iscsi .......................................................... [0 Target]
  o- loopback ....................................................... [0 Target]
  o- qla2xxx ........................................................ [0 Target]
/>


Then I configure tcm_loop and use blockio to setup the arrays to be accessible by lio-target. /dev/cciss/c0d0 is a HP MSA20 Storage Array disk array. If this were just a normal scsi disk you’d simply put /dev/sdb or so the like.

# tcm_node –block iblock_0/array1 /dev/cciss/c0d0

Now we configure lio, setup the LUNs, setup the Target Portals and setup LUN ACLs for security, and finally enable the portals. I’ve changed iqns and IPs below for my own privacy. 192.168.0.1 would be the IP of the iSCSI server/target itself.

# lio_node –addlun iqn.2010.com.stephenwagner.iscsi:array1 1 0 iscsi00 iblock_0/array1
# lio_node –addnp iqn.2010.com.stephenwagner.iscsi:array1 1 192.168.0.1:3260
# lio_node –disableauth iqn.2010.com.stephenwagner.iscsi:array1 1
# lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array1 1 iqn.1998-01.com.vmware:esx02 0 0
# lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array1 1