tgt conf说明

# This is a sample config file for tgt-admin.
# The files ending with '.conf' in this directory will be included.
#
# The "#" symbol disables the processing of a line.

# 一个lun的简单例子,默认允许所有initiators访问

# Sample target with one LUN only. Defaults to allow access for all initiators:

#<target iqn.2008-09.com.example:server.target1>
#    backing-store /dev/LVM/somedevice
#</target>

# 与前一个列子相同,但使用"direct-store" 代替"backing-store"
# "direct-store" 将读取通过sg_inq命令可获取的驱动参数,并设置到target
# 可使用sg_inq命令获取的参数有:
# - Vendor identification                   供应商ID
# - Product identification                  产品ID
# - Product revision level                  产品修订级别
# - Unit serial number (if present)     编号(如果存在的话)
# 同时指定 "incominguser".

# Similar, but we use "direct-store" instead of "backing-store".
# "direct-store" reads drive parameters with sg_inq command and sets them to
# the target.
# Parameters fatched with sg_inq are:
# - Vendor identification
# - Product identification
# - Product revision level
# - Unit serial number (if present)
# We also specify "incominguser".

#<target iqn.2008-09.com.example:server.target2>
#    direct-store /dev/sdd
#    incominguser someuser secretpass12
#</target>

# 多LUN 例子, 关闭write-cache (tgtd 默认开启) and 设置供应商ID为"MyVendor"

# An example with multiple LUNs, disabled write-cache (tgtd enables write-cache
# by default) and vendor identification set to "MyVendor"

#<target iqn.2008-09.com.example:server.target3>
#    backing-store /dev/LVM/somedevice1    # Becomes LUN 1
#    backing-store /dev/LVM/somedevice2    # Becomes LUN 2
#    backing-store /dev/LVM/somedevice3    # Becomes LUN 3
#    write-cache off
#    vendor_id MyCompany Inc.
#</target>


# 与上一个类似, 我们从磁盘获取了 供应商id, 产品id,产品修订级别和编号
# 所有盘的供应商ID被替换为"MyVendor" 

# Similar to the one above, but we fetch vendor_id, product_id, product_rev and
# scsi_sn from the disks.
# Vendor identification (vendor_id) is replaced in all disks by "MyVendor"

#<target iqn.2008-09.com.example:server.target4>
#    direct-store /dev/sdb    # Becomes LUN 1
#    direct-store /dev/sdc    # Becomes LUN 2
#    direct-store /dev/sdd    # Becomes LUN 3
#    write-cache off
#    vendor_id MyCompany Inc.
#</target>

# 同类store,lun编号从上至下,从小变大
# 混合store,优先backing-store,其次direct-store

# Note that "first-device-first-lun numbering" will work only for simple
# scenarios above, where _only_ direct-store _or_ backing-store is used.
# If you mix backing-store and direct-store, then all backing-store entries
# are processed before direct-store-entries.

#<target iqn.2008-09.com.example:server.target4>
#    direct-store /dev/sdb    # Becomes LUN 3
#    backing-store /dev/sdc    # Becomes LUN 1
#    direct-store /dev/sdd    # Becomes LUN 4
#    backing-store /dev/sde    # Becomes LUN 2
#</target>

# 更复杂的例子 - 每个设备包含不同的参数.
# 可使用缩进让配置更易读
# lun在这或多或少的随机被标记 (backing-store 优先drect-store被标记).
# 可以指定多个 mode_page参数(在这个例子中已被注释掉).
# 有些参数(如write-cache, scsi_sn)被指定为全局的("globally")
# "全局" 参数将被应用在所有lun; 并可分lun被“本地参数”("locally")重写
# 如果lun未被指定, 它将被自动分配 (优先有效).

# Even more complicated example - each device has different parameters.
# You can use indentation to make the config file more readable.
# Note that LUNs will be assigned more or less randomly here (and still
# backing-store get LUNs assigned before drect-store).
# You can specify multiple mode_page parameters (they are commented out
# in this example).
# Note that some parameters (write-cache, scsi_sn) were specified "globally".
# "Global" parameters will be applied to all LUNs; they can be overwritten
# "locally", per LUN.
# If lun is not specified, it will be allocated automatically (first available).

#<target iqn.2008-09.com.example:server.target5>

#    <direct-store /dev/sdd>
#    vendor_id VENDOR1
#    removable 1
#    device-type cd
#    lun 1
#    </direct-store>

#    <direct-store /dev/sda>
#    vendor_id VENDOR2
#    lun 2
#    </direct-store>

#    <backing-store /dev/sdb1>
#    vendor_id back1
#    scsi_sn SERIAL
#    write-cache on
    # lun 3        # lun is commented out - will be allocated automatically
#   </backing-store>

#    <backing-store /dev/sdd1>
#    vendor_id back2
    #mode_page 8:0:18:0x10:0:0xff....
    #mode_page 8:0:18:0x10:0:0xff....
    #bs-type aio
#    lun 15
#    </backing-store>

    # 更多可被locally替换的globally参数

# Some more parameters which can be specified locally or globally:
    #scsi_id ...
    #scsi_sn ...
    #vendor_id ...
    #product_id ...
    #product_rev ...
    #sense_format ...
    #removable ...
    #online ...
    #path ...
    #mode_page 8:0:18:0x10:0:0xff....
    #mode_page 8:0:18:0x10:0:0xff....
    #device-type ...
    #bs-type ...    # backing store type - default rdwr, can be aio, mmap, etc...
    #allow-in-use yes    # if specified globally, can't be overwritten locally

#    write-cache off
#    scsi_sn multipath-10

    # 以下参数只能为全局. 不能分lun指定.
    # 只允许 192.168.100.1,192.168.200.5连接

# Parameters below are only global. They can't be configured per LUN.
    # Only allow connections from 192.168.100.1 and 192.168.200.5
#    initiator-address 192.168.100.1
#    initiator-address 192.168.200.5

    # 调节参数(全局,分target) 

    # Tuning parameters (global, per target)
    #MaxRecvDataSegmentLength 8192
    #MaxXmitDataSegmentLength 8192
    #HeaderDigest None
    #DataDigest None
    #InitialR2T Yes
    #MaxOutstandingR2T 1
    #ImmediateData Yes
    #FirstBurstLength 65536
    #MaxBurstLength 262144
    #DataPDUInOrder Yes
    #DataSequenceInOrder Yes
    #ErrorRecoveryLevel 0
    #IFMarker No
    #OFMarker No
    #DefaultTime2Wait 2
    #DefaultTime2Retain 20
    #OFMarkInt Reject
    #IFMarkInt Reject
    #MaxConnections 1

       # 可访问用户    

# Allowed incoming users
#    incominguser user1 secretpass12
#    incominguser user2 secretpass23

   # 可导出用户

# Outgoing user
#    outgoinguser userA secretpassA
#</target>

# 如果指定lun id,将不再从1开始

# The device will have lun 1 unless you specify something else
#<target iqn.2008-09.com.example:server.target6>
#    backing-store /dev/LVM/somedevice
#    lun 10
#</target>

# 在用设备不能被再次使用,除非使用--force或添加了allow-in-use yes

# Devices which are in use (by system: mounted, for swap, part of RAID, or by
# userspace: dd, by tgtd for another target etc.) can't be used, unless you use
# --force flag or add 'allow-in-use yes' option
#<target iqn.2008-09.com.example:server.target7>
#    backing-store /dev/LVM/somedevice
#    allow-in-use yes
#</target>
#<target iqn.2008-09.com.example:server.target8>
#    <backing-store /dev/LVM/somedevice>
#        scsi_sn serial1
#    </backing-store>

#    <backing-store /dev/LVM/somedevice2>
#        scsi_sn serial2
#    </backing-store>

#    allow-in-use yes
#</target>

# 不支持的配置

# Not supported configurations, and therefore, commented out:

#<target iqn.2008-09.com.example:server.target9>
#    backing-store /dev/LVM/somedevice1
#    backing-store /dev/LVM/somedevice2
#    lun 10
#    lun 11
#</target>
#<target iqn.2008-09.com.example:server.target10>
#    <direct-store /dev/sdd>
#        vendor_id VENDOR1
#    </direct-store>
#
#    direct-store /dev/sdc
#</target>

# 这个将被退出解析

# This one will break the parser:

#<target iqn.2008-09.com.example:server.target11>
#    <direct-store /dev/sdd>
#        vendor_id VENDOR1
#    </direct-store>
#
#    direct-store /dev/sdc
#
#    <direct-store /dev/sdd>
#        vendor_id VENDOR1
#    </direct-store>
#</target>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值