- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:scst [2014/06/14 08:19] admin [Zmena velikosti] |
linux:scst [2017/02/06 12:16] (current) tomsa |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== SCST ===== | + | ===== SCST install ===== |
- | Fajna hracka | + | 388 echo blacklist qla2xxx >/etc/modprobe.d/blacklist-qla2xxx.conf |
+ | 389 rmmod qla2xxx | ||
+ | 390 make 2release | ||
+ | 391 aptitude install make | ||
+ | 392 make 2release | ||
+ | 393 BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all install | ||
+ | 394 BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all install | ||
+ | 395 BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all install | ||
+ | 396 modprobe scst | ||
+ | 397 modprobe iscsi-scst | ||
+ | 398 depmod -a | ||
+ | 399 modprobe iscsi-scst | ||
+ | 400 modprobe qla2xxx_scst | ||
+ | 401 modprobe qla2x00tgt | ||
+ | 402 modprobe scst_vdisk | ||
+ | make install | ||
+ | |||
+ | 481 make | ||
+ | 482 make 2release | ||
+ | 483 uname -a | ||
+ | 484 make | ||
+ | 485 make qla | ||
+ | 486 cd qla2x00t/ | ||
+ | 487 ls | ||
+ | 488 make | ||
+ | 489 make modules | ||
+ | 490 make qla2xxx_tgt | ||
+ | 491 make qla | ||
+ | 492 cd .. | ||
+ | 493 make qla | ||
+ | 494 make qla2xxx_tgt | ||
+ | 497 make scstadm | ||
+ | 498 make scstadm install | ||
+ | 499 make scstadm_install | ||
+ | |||
+ | ===== Doporucene nastaveni - vzorovy config ===== | ||
+ | * device pouzivame fileio | ||
+ | * pouzivame vsude nv_cache | ||
+ | * IMPORTANT: V pripade, ze se v infrastrukture pouziva multipath je VELICE dulezite udavat u disku t10_dev_id a jeho prvnich 8 znaku musi byt unikatni v celem systemu (vsechny storage) nebot z nej vychazi scsi_id, podle ktereho multipath paruje disky. scsi_id (wwid) se da ziskat nasledujicim prikazem: | ||
+ | <code bash>/lib/udev/scsi_id -u -g -v /dev/sdh</code> | ||
+ | |||
+ | <code> | ||
+ | HANDLER vdisk_fileio { | ||
+ | DEVICE testing1g { | ||
+ | filename /dev/virtualgrp/lvtest | ||
+ | nv_cache 1 | ||
+ | t10_dev_id 1y65xpcl-testing1g | ||
+ | } | ||
+ | } | ||
+ | |||
+ | TARGET_DRIVER qla2x00t { | ||
+ | TARGET 21:00:00:1b:32:10:2f:88 { | ||
+ | HW_TARGET | ||
+ | enabled 0 | ||
+ | re_tgt_id 1 | ||
+ | |||
+ | LUN 0 testing1g | ||
+ | } | ||
+ | |||
+ | TARGET 21:01:00:1b:32:30:2f:88 { | ||
+ | HW_TARGET | ||
+ | enabled 1 | ||
+ | |||
+ | re_tgt_id 2 | ||
+ | LUN 0 testing1g | ||
+ | } | ||
+ | } | ||
+ | |||
+ | TARGET_DRIVER iscsi { | ||
+ | enabled 1 | ||
+ | |||
+ | TARGET iqn.2012-08.cz.starlab:testing1g { | ||
+ | LUN 0 testing1g | ||
+ | enabled 1 | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | POZOR: pokud postupujete pri kompilaci scst podle [[http://scst.sourceforge.net/qla2x00t-howto.html|oficialniho navodu]] s dvouhlavou kartou, skript v bode 22 vam vygeneruje spatnou konfiguraci, pro kazdy target totiz vytvori samostatnou TARGET_DRIVER direktivu a v target modu bude posleze pouze hlava uvedena v konfiguraku jako posledni. Doporucuji tedy vychazet z vyse uvedene konfigurace (pozn. HW_TARGET zda se byl odstranen a take mi zpusoboval nefunkcnost konfiguraku) | ||
===== Mazani oddilu ===== | ===== Mazani oddilu ===== | ||
Tak smazat to jde. Postup je nasledujici: | Tak smazat to jde. Postup je nasledujici: | ||
Line 26: | Line 104: | ||
echo 1 >/sys/block/sddu/device/rescan | echo 1 >/sys/block/sddu/device/rescan | ||
+ | ====== Pridani svazku do Group ====== | ||
+ | Nize uvedeny priklad vytvori diskovy oddil v LVM. Prida ho do sekce "DEVICE" v scst. Vytvori groupu "sovgut" na druhem fc portu. Priradi novy diskovy oddil do teto groupy pod cislem 82. A nakonec povoli pristup pouze z wwn = '10:00:00:00:c9:6b:34:1e" (coz je pro otestovani nas Low). | ||
+ | <code> | ||
+ | lvcreate .... -n sovgut2 | ||
+ | scstadmin -open_dev sovgut2 -handler vdisk_fileio -attributes filename=/dev/virtualgrp/sovgut2,nv_cache=1 | ||
+ | scstadmin -add_group "sovgut" -driver qla2x00t -target "21:00:00:1b:32:10:2f:88" | ||
+ | scstadmin -add_lun 82 -driver qla2x00t -target '21:00:00:1b:32:10:2f:88' -group sovgut -device sovgut2 | ||
+ | scstadmin -add_init "10:00:00:00:c9:6b:34:1e" -driver qla2x00t -target '21:00:00:1b:32:10:2f:88' -group sovgut | ||
+ | </code> | ||
+ | |||
+ | a nezapomenout | ||
+ | scsiadmin -write_config /etc/scst.conf | ||
+ | | ||
+ | ====== Odkazy ====== | ||
+ | [[http://louwrentius.com/configuring-scst-iscsi-target-on-debian-linux-wheezy.html|Configuring SCST iSCSI Target]] |
linux/scst.1402726774.txt.gz · Last modified: 2014/06/14 08:19 by admin