Differences

This shows you the differences between two versions of the page.

Link to this comparison view

saisp:labs:06:contents:06 [2013/11/11 00:46]
127.0.0.1 external edit
saisp:labs:06:contents:06 [2014/03/30 00:26] (current)
mihai.carabas [06. LIO backstore as a physical block device]
Line 1: Line 1:
-==== 06. Lorem ipsum ====+==== 06. [20p] LIO backstore as a physical block device ​====
  
-...+Creați un ''​backstore''​ de tip physical device (Hint: ''​iblock''​) folosind discul ''/​dev/​sdb''​ de pe stația ''​storage1''​Asociați ''​backstore''​-ul creat cu un LUN și montați-l pe stația ''​storage3''​Nu uitați să mapați IQN-ul stației ''​storage3''​ la noul LUN.
  
 +<note warning>​Implicit,​ clientul creat de voi va avea acces la toate LUN-urile. Permiteți accesul doar pentru ''​LUN 2''​. Eliminați de asemenea ''​LUN 2''​ de la IQN-ul stației ''​storage2''​.</​note>​
 +
 +<​solution -hidden>
 +<code bash>
 +root@storage1:​~#​ targetcli
 +/> cd backstores/​iblock
 +/​backstores/​iblock>​ create sdb /dev/sdb
 +Generating a wwn serial.
 +Created iblock storage object sdb using /dev/sdb.
 +/​backstores/​iblock>​ cd /​iscsi/​iqn.2003-01.org.linux-iscsi.storage1.x8664:​sn.25e09e86bb4d/​tpgt1/​luns/​
 +/​iscsi/​iqn.20...4d/​tpgt1/​luns>​ create /​backstores/​iblock/​sdb lun2
 +Successfully created LUN 2.
 +Created mapped LUN 2 in node ACL iqn.2005-03.org.open-iscsi:​fc35d7d3fc24
 +/> saveconfig
 +WARNING: Saving storage1 current configuration to disk will overwrite your boot settings.
 +The current target configuration will become the default boot config.
 +Are you sure? Type '​yes':​ yes
 +
 +
 +root@storage3:​~#​ apt-get install open-iscsi
 +root@storage3:​~#​ iscsi-iname
 +iqn.2005-03.org.open-iscsi:​8ceabce62de9
 +root@storage3:​~#​ cat /​etc/​iscsi/​initiatorname.iscsi
 +InitiatorName=iqn.2005-03.org.open-iscsi:​8ceabce62de9
 +
 +/> cd /​iscsi/​iqn.2003-01.org.linux-iscsi.storage1.x8664:​sn.25e09e86bb4d/​tpgt1/​acls/​
 +/​iscsi/​iqn.20...4d/​tpgt1/​acls>​ create iqn.2005-03.org.open-iscsi:​8ceabce62de9
 +Successfully created Node ACL for iqn.2005-03.org.open-iscsi:​8ceabce62de9
 +Created mapped LUN 2.
 +Created mapped LUN 1.
 +Created mapped LUN 0.
 +/​iscsi/​iqn.20...4d/​tpgt1/​acls>​ cd iqn.2005-03.org.open-iscsi:​8ceabce62de9
 +/​iscsi/​iqn.20...:​8ceabce62de9>​ delete 0
 +Deleted Mapped LUN 0.
 +/​iscsi/​iqn.20...:​8ceabce62de9>​ delete 1
 +Deleted Mapped LUN 1.
 +/> saveconfig
 +WARNING: Saving storage1 current configuration to disk will overwrite your boot settings.
 +The current target configuration will become the default boot config.
 +Are you sure? Type '​yes':​ yes
 +
 +root@storage3:​~#​ iscsiadm --mode discovery --type st --portal 192.168.1.1
 +192.168.1.1:​3260,​1 iqn.2003-01.org.linux-iscsi.storage1.x8664:​sn.25e09e86bb4d
 +root@storage3:​~#​ iscsiadm -m node -L all
 +Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.storage1.x8664:​sn.25e09e86bb4d,​ portal: 192.168.1.1,​3260] (multiple)
 +Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.storage1.x8664:​sn.25e09e86bb4d,​ portal: 192.168.1.1,​3260] successful.
 +root
 +root@storage3:​~#​ iscsiadm -m session
 +tcp: [1] 192.168.1.1:​3260,​1 iqn.2003-01.org.linux-iscsi.storage1.x8664:​sn.25e09e86bb4d (non-flash)
 +
 +root@storage3:​~#​ dmesg |tail -10
 +[24607.849541] scsi3 : iSCSI Initiator over TCP/IP
 +[24608.105052] scsi 3:0:0:2: Direct-Access ​    ​LIO-ORG ​ IBLOCK ​          ​4.0 ​ PQ: 0 ANSI: 5
 +[24608.105819] sd 3:0:0:2: Attached scsi generic sg3 type 0
 +[24608.107245] sd 3:0:0:2: [sdd] 204800 512-byte logical blocks: (104 MB/100 MiB)
 +[24608.110439] sd 3:0:0:2: [sdd] Write Protect is off
 +[24608.110442] sd 3:0:0:2: [sdd] Mode Sense: 43 00 00 08
 +[24608.111382] sd 3:0:0:2: [sdd] Write cache: disabled, read cache: enabled, doesn'​t support DPO or FUA
 +[24608.120119] ​ sdd: unknown partition table
 +[24608.124463] sd 3:0:0:2: [sdd] Attached SCSI disk
 +[24615.904190] nfs: server storage1 not responding, timed out
 +</​code>​
 +</​solution>​
  
saisp/labs/06/contents/06.1384123598.txt.gz · Last modified: 2014/03/29 23:15 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0