[[FrontPage]]
#navi(../)



iSCSI Enterprise Target (IET) softwareのインストール

**準備: [#j63c4993]
iSCSI Enterprise Target projectのホームページ
http://iscsitarget.sourceforge.net/

wiki
http://sourceforge.net/apps/mediawiki/iscsitarget/index.php?title=HowToInstall

FAQ
http://sourceforge.net/apps/mediawiki/iscsitarget/index.php?title=FrequentlyAskedQuestions

Download
http://sourceforge.net/projects/linux-iscsi/files/


***インストール前の確認事項: [#t8c85a9a]
+++下記が有効になっているカーネル
~CONFIG_CRYPTO(Cryptographic API)
~CONFIG_CRYPTO_CRC32C(CRC32c CRC algorithm)
~SCSI device support 
~FusionMPT ScsiHost drivers for xxx 
~FusionMPT misc device driver 

+++カーネルのヘッダーファイル等
+++openssl-devel パッケージのインストール
+++カーネルコンパイル [#xef22f88]
~[[LS-GL Lenny-armel/kernelコンパイル]]

***iSCSI Enterprise Targetインストール [#uf629015]
+ディレクトリ変更
 LS-GL:~# cd /usr/src/
+iscsi-targetのダウンロード
 LS-GL:/usr/src# wget http://sourceforge.net/projects/iscsitarget/files/iscsitarget/0.4.17/iscsitarget-0.4.
 17.tar.gz/ download
 --2009-07-29 20:11:03-- http://sourceforge.net/projects/iscsitarget/files/iscsitarget/0.4.17/iscsitarget-
 0.4.17.tar.gz/download
 Resolving sourceforge.net... 216.34.181.60
 Connecting to sourceforge.net|216.34.181.60|:80... connected.
 HTTP request sent, awaiting response... 302 Found
 Location: http://downloads.sourceforge.net/project/iscsitarget/iscsitarget/0.4.17/iscsitarget-0.4.17.tar.g
 z?use_mirror=ncu [following]
 --2009-07-29 20:11:04-- http://downloads.sourceforge.net/project/iscsitarget/iscsitarget/0.4.17/iscsitarge
 t-0.4.17.tar.gz?use_mirror=ncu
 Resolving downloads.sourceforge.net... 216.34.181.59
 Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
 HTTP request sent, awaiting response... 302 Found
 Location: http://ncu.dl.sourceforge.net/project/iscsitarget/iscsitarget/0.4.17/iscsitarget-0.4.17.tar.gz
 [following] 
 --2009-07-29 20:11:05-- http://ncu.dl.sourceforge.net/project/iscsitarget/iscsitarget/0.4.17/iscsitarget-0.
 4.17.tar.gz
 Resolving ncu.dl.sourceforge.net... 140.115.17.45
 Connecting to ncu.dl.sourceforge.net|140.115.17.45|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 107884 (105K) [application/x-gzip]
 Saving to: `iscsitarget-0.4.17.tar.gz'
 
 100%[================================================>] 107,884   302K/s  in 0.3s
 
 2009-07-29 20:11:06 (302 KB/s) - `iscsitarget-0.4.17.tar.gz' saved [107884/107884]
 
+ダウンロードしたファイルの展開
 LS-GL:/usr/src# tar zxvf iscsitarget-0.4.17.tar.gz
 iscsitarget-0.4.17/
 iscsitarget-0.4.17/etc/
 iscsitarget-0.4.17/etc/initd/
 iscsitarget-0.4.17/etc/initd/initd
 iscsitarget-0.4.17/etc/initd/initd.debian
 iscsitarget-0.4.17/etc/initd/initd.gentoo
 iscsitarget-0.4.17/etc/initd/initd.redhat
 iscsitarget-0.4.17/etc/ietd.conf
 iscsitarget-0.4.17/etc/initiators.allow
 iscsitarget-0.4.17/etc/initiators.deny
 iscsitarget-0.4.17/README.vmware
 iscsitarget-0.4.17/doc/
 iscsitarget-0.4.17/doc/manpages/
 iscsitarget-0.4.17/doc/manpages/ietd.conf.5
 iscsitarget-0.4.17/doc/manpages/ietd.8
 iscsitarget-0.4.17/doc/manpages/ietadm.8
 iscsitarget-0.4.17/kernel/
 iscsitarget-0.4.17/kernel/digest.c
 iscsitarget-0.4.17/kernel/target.c
 iscsitarget-0.4.17/kernel/block-io.c
 iscsitarget-0.4.17/kernel/iscsi.h
 iscsitarget-0.4.17/kernel/digest.h
 iscsitarget-0.4.17/kernel/wthread.c
 iscsitarget-0.4.17/kernel/iscsi_hdr.h
 iscsitarget-0.4.17/kernel/config.c
 iscsitarget-0.4.17/kernel/iscsi_dbg.h
 iscsitarget-0.4.17/kernel/session.c
 iscsitarget-0.4.17/kernel/param.c
 iscsitarget-0.4.17/kernel/volume.c
 iscsitarget-0.4.17/kernel/file-io.c
 iscsitarget-0.4.17/kernel/iscsi.c
 iscsitarget-0.4.17/kernel/iotype.c
 iscsitarget-0.4.17/kernel/tio.c
 iscsitarget-0.4.17/kernel/nthread.c
 iscsitarget-0.4.17/kernel/conn.c
 iscsitarget-0.4.17/kernel/null-io.c
 iscsitarget-0.4.17/kernel/event.c
 iscsitarget-0.4.17/kernel/Makefile
 iscsitarget-0.4.17/kernel/target_disk.c
 iscsitarget-0.4.17/kernel/iotype.h
 iscsitarget-0.4.17/ChangeLog
 iscsitarget-0.4.17/README
 iscsitarget-0.4.17/usr/
 iscsitarget-0.4.17/usr/target.c
 iscsitarget-0.4.17/usr/ctldev.c
 iscsitarget-0.4.17/usr/misc.h
 iscsitarget-0.4.17/usr/chap.c
 iscsitarget-0.4.17/usr/iscsi_hdr.h
 iscsitarget-0.4.17/usr/iscsid.c
 iscsitarget-0.4.17/usr/config.h
 iscsitarget-0.4.17/usr/ietd.c
 iscsitarget-0.4.17/usr/isns_proto.h
 iscsitarget-0.4.17/usr/session.c
 iscsitarget-0.4.17/usr/param.c
 iscsitarget-0.4.17/usr/types.h
 iscsitarget-0.4.17/usr/param.h
 iscsitarget-0.4.17/usr/log.c
 iscsitarget-0.4.17/usr/ietadm.c
 iscsitarget-0.4.17/usr/isns.c
 iscsitarget-0.4.17/usr/message.c
 iscsitarget-0.4.17/usr/conn.c
 iscsitarget-0.4.17/usr/iscsid.h
 iscsitarget-0.4.17/usr/plain.c
 iscsitarget-0.4.17/usr/event.c
 iscsitarget-0.4.17/usr/Makefile
 iscsitarget-0.4.17/usr/ietadm.h
 iscsitarget-0.4.17/include/
 iscsitarget-0.4.17/include/iet_u.h
 iscsitarget-0.4.17/patches/
 iscsitarget-0.4.17/patches/compat-sles10sp2.patch
 iscsitarget-0.4.17/patches/compat-2.6.19-2.6.21.patch
 iscsitarget-0.4.17/patches/compat-2.6.14-2.6.18.patch
 iscsitarget-0.4.17/patches/compat-rhel4.patch
 iscsitarget-0.4.17/patches/compat-2.6.22-2.6.23.patch
 iscsitarget-0.4.17/COPYING
 iscsitarget-0.4.17/Makefile
 LS-GL:/usr/src#
+ダウンロードしたファイルの削除
 LS-GL:/usr/src# rm iscsitarget-0.4.17.tar.gz
 rm: remove regular file `iscsitarget-0.4.17.tar.gz'? y
+展開してできたディレクトリに移動
 LS-GL:/usr/src# cd iscsitarget-0.4.17/
+内容確認
 LS-GL:/usr/src/iscsitarget-0.4.17# ll
 total 76
 -rw-r--r-- 1 debian debian 18010 Nov 28 2005 COPYING
 -rw-r--r-- 1 debian debian 11869 Nov 30 2008 ChangeLog
 -rw-r--r-- 1 debian debian 7586 Nov 16 2008 Makefile
 -rw-r--r-- 1 debian debian 4987 Mar 30 2007 README
 -rw-r--r-- 1 debian debian 2481 Dec 7 2006 README.vmware
 drwxr-xr-x 3 debian debian 4096 Nov 30 2008 doc
 drwxr-xr-x 3 debian debian 4096 Nov 30 2008 etc
 drwxr-xr-x 2 debian debian 4096 Nov 30 2008 include
 drwxr-xr-x 2 debian debian 4096 Nov 30 2008 kernel
 drwxr-xr-x 2 debian debian 4096 Nov 30 2008 patches
 drwxr-xr-x 2 debian debian 4096 Nov 30 2008 usr
+make
~「KSRC」でカーネルソースのトップディレクトリを指定する
~詳しくはhttp://debian.fam.cx/index.php?Software%2FLinuxKernel#nef2ea75で確認してください。
 LS-GL:/usr/src/iscsitarget-0.4.17# make KSRC=/usr/src/linux-2.6.25.11
 make -C usr
 make[1]: Entering directory `/usr/src/iscsitarget-0.4.17/usr'
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o ietd.o ietd.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o iscsid.o iscsid.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o conn.o conn.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o session.o session.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o target.o target.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o message.o message.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o ctldev.o ctldev.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o log.o log.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o chap.o chap.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o event.o event.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o param.o param.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o plain.o plain.c
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o isns.o isns.c
 cc ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o 
 isns.o -o ietd -lcrypto
 cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -D_GNU_SOURCE  -c -o ietadm.o ietadm.c
 cc ietadm.o param.o -o ietadm
 make[1]: Leaving directory `/usr/src/iscsitarget-0.4.17/usr'
 make -C /usr/src/linux-2.6.25.11 SUBDIRS=/usr/src/iscsitarget-0.4.17/kernel modules
 make[1]: Entering directory `/usr/src/linux-2.6.25.11'
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/tio.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/iscsi.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/nthread.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/wthread.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/config.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/digest.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/conn.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/session.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/target.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/volume.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/iotype.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/file-io.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/null-io.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/target_disk.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/event.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/param.o
  CC [M] /usr/src/iscsitarget-0.4.17/kernel/block-io.o
  LD [M] /usr/src/iscsitarget-0.4.17/kernel/iscsi_trgt.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC   /usr/src/iscsitarget-0.4.17/kernel/iscsi_trgt.mod.o
  LD [M] /usr/src/iscsitarget-0.4.17/kernel/iscsi_trgt.ko
 make[1]: Leaving directory `/usr/src/linux-2.6.25.11'
+インストール
 LS-GL:/usr/src/iscsitarget-0.4.17# make KSRC=/usr/src/linux-2.6.25.11 install
 removed `/usr/sbin/ietd'
 `usr/ietd' -> `/usr/sbin/ietd'
 removed `/usr/sbin/ietadm'
 `usr/ietadm' -> `/usr/sbin/ietadm'
 `etc/initd/initd.debian' -> `/etc/init.d/iscsi-target'
 `doc/manpages/ietadm.8' -> `/usr/share/man/man8/ietadm.8'
 `doc/manpages/ietd.8' -> `/usr/share/man/man8/ietd.8'
 `doc/manpages/ietd.conf.5' -> `/usr/share/man/man5/ietd.conf.5'
 `ChangeLog' -> `/usr/share/doc/iscsitarget/ChangeLog'
 `COPYING' -> `/usr/share/doc/iscsitarget/COPYING'
 `README' -> `/usr/share/doc/iscsitarget/README'
 removed `/usr/share/doc/iscsitarget/README.vmware'
 `README.vmware' -> `/usr/share/doc/iscsitarget/README.vmware'
 install: creating directory `/lib/modules/2.6.25.11/kernel/iscsi'
 `kernel/iscsi_trgt.ko' -> `/lib/modules/2.6.25.11/kernel/iscsi/iscsi_trgt.ko'
 Running depmod
 LS-GL:/usr/src/iscsitarget-0.4.17#
***iSCSI Enterprise Target 設定・起動 [#p48eda9a]
+ファイル編集
~/etc/default/iscsitarget
 ISCSITARGET_ENABLE=true
+ファイル編集
~/etc/ietd.conf
 # Virtual Drive File.
 Target iqn.2007-05.tzmini:iSCSI01
         IncomingUser
         OutgoingUser
         Lun 0 Path=/VirtualHd/250G.vhdd,Type=fileio
 # USB memory for test.
 Target iqn.2007-05.tzmini:iSCSI02
         IncomingUser
         OutgoingUser
         Lun 0 Path=/dev/sda,Type=fileio
+起動してみる
 LS-GL:/usr/src/iscsitarget-0.4.17# /etc/init.d/iscsitarget start
 Starting iSCSI enterprise target service: succeeded.
 LS-GL:/usr/src/iscsitarget-0.4.17#
+モジュールがロードされていることを確認
 LS-GL:/usr/src/iscsitarget-0.4.17# lsmod
 Module         Size Used by
 iscsi_trgt       76072 4
 LS-GL:/usr/src/iscsitarget-0.4.17#

*** [#b21bd6f7]
#navi(../)

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS