Erinevus lehekülje "LIO iSCSI target" redaktsioonide vahel

Allikas: Kuutõrvaja
(Kasutamine)
54. rida: 54. rida:
 
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.
 
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
+
  # tcm_node –block iblock_0/array1 /dev/cciss/c0d0
tcm_node –block iblock_1/array2 /dev/cciss/c0d1
 
  
 
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.
 
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 –addlun iqn.2010.com.stephenwagner.iscsi:array1 1 0 iscsi00 iblock_0/array1
  lio_node –addlun iqn.2010.com.stephenwagner.iscsi:array2 1 0 iscsi01 iblock_1/array2
+
  # lio_node –addnp iqn.2010.com.stephenwagner.iscsi:array1 1 192.168.0.1:3260
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 –addnp iqn.2010.com.stephenwagner.iscsi:array2 1 192.168.0.1:3260
+
  # lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array1 1 iqn.1998-01.com.vmware:esx02 0 0
lio_node –disableauth iqn.2010.com.stephenwagner.iscsi:array1 1
+
  # lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array1 1
  lio_node –disableauth iqn.2010.com.stephenwagner.iscsi:array2 1
 
lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array1 1 iqn.1998-01.com.vmware:esx02 0 0
 
lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array1 1 iqn.1998-01.com.vmware:esx03 0 0
 
lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array2 1 iqn.1998-01.com.vmware:esx02 0 0
 
  lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array2 1 iqn.1998-01.com.vmware:esx03 0 0
 
lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array1 1
 
lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array2 1
 
  
 
*http://www.linux-iscsi.org/wiki/RTSadmin RTSadmin manual.
 
*http://www.linux-iscsi.org/wiki/RTSadmin RTSadmin manual.
  
 
*https://wiki.archlinux.org/index.php/ISCSI_Target
 
*https://wiki.archlinux.org/index.php/ISCSI_Target

Redaktsioon: 22. oktoober 2012, kell 14:13

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