istgtでiSCSI Target

iSCSI Target(言い方変えるとiSCSIサーバ)を作る。




  Comment "Global section"
  NodeBase ""

  PidFile /var/run/
  AuthFile /usr/local/etc/istgt/auth.conf

  MediaDirectory /var/istgt

  LogFacility "local7"

  Timeout 30
  NopInInterval 20

  DiscoveryAuthMethod Auto

  MaxSessions 64
  MaxConnections 16

  FirstBurstLength 65536
  MaxBurstLength 262144
  MaxRecvDataSegmentLength 262144

  Comment "Internal Logical Unit Controller"
  AuthMethod CHAP Mutual
  AuthGroup AuthGroup10000
  Portal UC1 [::1]:3261
  Portal UC1
  Netmask [::1]

  Portal DA1 [2001:380:e08:e7::31]:3260
  Portal DA1

  Comment "Initiator Group1"
  InitiatorName "ALL"
  Netmask [2001:380:e08:e7::]/64

  Comment "Hard Disk Sample"
  TargetName disk1
  TargetAlias "Data Disk1"
  Mapping PortalGroup1 InitiatorGroup1
  AuthMethod Auto
  AuthGroup AuthGroup1
  UseDigest Auto
  UnitType Disk
  QueueDepth 32
  LUN0 Storage /mnt/lib_01/OS/iSCSI/esxi-01 20GB
# 複数台のディスクが必要な場合は、LUNXを増やしていけばいい。
# LUN1 Storage /mnt/lib_01/OS/iSCSI/esxi-02 20GB


  Comment "Auth Group1"

/usr/local/etc/istgt/istgtcontrol.conf (特に何か書き換えた記憶が無い。)

  Comment "sample configuration"

  # socket I/O timeout sec.
  Timeout 60

  # authentication information
  #AuthMethod Auto
  AuthMethod CHAP Mutual
  Auth "testuser" "secret" "mutual user" "mutual secret"
  #AuthMethod CHAP
  #Auth "testuser" "secret"

  # default controller's host name or IP and port
  Host localhost
  Port 3261

  # default target name and LUN
  #TargetName "iqn.xxxx"
  TargetName ""
  Lun 0

  # removable file's flag, initial size if creating
  # ro: read only, rw: read and write
  # auto: use existing size or minimum size
  Flags "ro"
  Size "auto"
os/freebsd/istgt/lun0.txt · 最終更新: 2012/01/16 00:14 by yuki
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0