targets.conf(5) — tgt — Debian bullseye — Debian Manpages (2024)

targets.conf - Linux SCSI Target Configuration File

tgt-admin uses /etc/tgt/targets.conf to initialize tgtd configuration, by default. Its layout uses a HTML-like structure, with a hierarchy of nested tags to define targets and LUNs.

Global directives configure options that are global to tgtd's configuration, as well as defining exported targets, via target sections.

Target sections contain directives specific to one target device. They define each target's exported LUNs via "backing-store" and "direct-store" directives, as well as other target-wide options.

LUN directives ("backing-store" and "direct-store") may contain options specific to a single exported logical unit.

With the exception of target directives, each of these should occur at most once.

<target <IQN>>

Defines a the start of a target definition. IQN is an ISCSI Qualified Name such as "iqn.2001-04.com.example:storage1".

Within this block should be target-level directives, as documented below.

The target definition ends with "</target>"

default-driver <lld>

Instead of specifying a driver type for each target, default-driver defines a default low-level driver for all exported targets. It may be overriden on a per-target basis. Valid lld values are "iscsi" or "iser". Since iscsi is assumed if this directive is not present, it is only generally needed if iser is the desired default.

include <path>

Include the configuration from another configuration file. Wildcards are allowed, so an example like "include /etc/tgt/xen/*.conf" is allowed.

ignore-errors yes

Errors from tgtadm will be ignored. Default is no.

control-port <port>

Define a different local socket key for communicating with tgtd. Defaults to 0. This is only generally useful if multiple instances of tgtd are in use.

iSNSServerIP <addr>

Define the address of the iSNS server in IPv4 dotted-quad address format. Required when using iSNS, otherwise ignored.

iSNSAccessControl <value>

Set iSNS access control. Valid values are "On" or "Off". Required when using iSNS, otherwise ignored.

iSNSServerPort <port>

Set a different iSNS server port. Default is 3205. Optional when using iSNS, otherwise ignored.

iSNS On

Enable iSNS. Only valid value is "On". Default is off.

incomingdiscoveryuser <user> <userpassword>

Define iscsi incoming discovery authentication setting. If no value is given, no authentication is performed.

outgoingdiscoveryuser <user> <userpassword>

Define iscsi outgoing discovery authentication setting. If no value is given, no authentication is performed.

Each target may export multiple block devices, or logical units (LUNs). For the purposes of LUN numbering, backing-store directives are processed before direct-store directives.

backing-store <path>

Defines a logical unit (LUN) exported by the target. This may specify either a regular file, or a block device.

direct-store <path>

Defines a direct mapped logical unit (LUN) with the same properties as the physical device (such as VENDOR_ID, SERIAL_NUM, etc.)

driver <lld>

Define the low-level driver to use for this target, either "iscsi" or "iser" (without quotes). This overrides the "default-driver" global directive.

initiator-address <addr>

Allows connections only from the specified IP address. Defaults to ALL if no initiator-address directive is specified.

initiator-name <addr>

Allows connections only from the specified initiator name.

incominguser <user> <userpassword>

Define iscsi incoming authentication setting. If no "incominguser" is specified, it is not used. This directive may be used multiple times per target.

outgoinguser <user> <userpassword>

Define iscsi outgoing authentication setting. If no "outgoinguser" is specified, it is not used. This directive may be used multiple times per target.

controller_tid <val>

Define the tid of the controller. Default is next available integer.

All of these may be listed at the target level (and apply to all LUNs) or within an individual LUN's definition, if it is defined using the container-style, multi-line definition, rather than single-line definition format:

<backing-store /dev/sdb1>
# LUN directives go here</backing-store><direct-store /dev/sdb1>
# LUN directives go here</direct-store>

It is recommended to use either single-line or container-style LUN definitions within a target. Mixing styles can cause parser errors.

write-cache <val>

"on" or "off", default on.

scsi_id <val>

scsi_sn <val>

vendor_id <val>

product_id <val>

product_rev <val>

sense_format <val>

removable <val>

path <val>

mode_page <val>

readonly <val>

device-type <val>

bs-type <val>

allow-in-use <val>

block-size <val>

Specify the block size for this LUN.

lbppbe <val>

Specify the Logical blocks per physical block exponent. By default TGTD will set the lbppbe to automatically match the underlying filesystem. Use this parameter to override that setting.

This is an internal option that should not be set directly.

la_lba <val>

Specify the lowest aligned logical block address. This is an internal option that should not be set directly.

optimal_xfer_gran <val>

Specify the optimal transfer granularity, to be reflected in the Block Limits VPD. This is an internal option that should not be set directly.

optimal_xfer_len <val>

Specify the optimal transfer length, to be reflected in the Block Limits VPD. This is an internal option that should not be set directly.

params <vals>

Pass additional parameters to tgtadm.

Example configuration file:<target iqn.2007-04.com.example:san.monitoring>
backing-store /dev/san/monitoring
# if no "incominguser" is specified, it is not used
incominguser backup secretpass12
# defaults to ALL if no "initiator-address" is specified
initiator-address 192.168.1.2</target><target iqn.2007-02.com.example:san.xen1>
backing-store /dev/san/xen1-disk1 # LUN1
direct-store /dev/san/xen1-disk2 # LUN2
initiator-address 192.168.1.2 # Allowed IP
initiator-address 192.168.5.6 # Allowed IP
incominguser user1 secretpass12
incominguser user2 secretpass23
outgoinguser userA secretpassA</target><target iqn.2007-02.com.example:san.xen2>
backing-store /dev/san/xen2</target><target iqn.2007-06.com.example:san.vmware1>
backing-store /dev/san/vmware1</target>

/etc/tgt/targets.conf

Configuration file for tgt-admin.

/usr/share/doc/tgt/targets.conf.example

Example configuration file for tgt-admin.

tgtd(8), tgtadm(8), tgtimg(8), tgt-setup-lun(8). http://stgt.sourceforge.net/

Report bugs to <stgt@vger.kernel.org>

targets.conf(5) — tgt — Debian bullseye — Debian Manpages (2024)
Top Articles
10 Best Prepared Meals at Publix
Here’s What to Buy at the Publix Deli
Barstool Sports Gif
Www.paystubportal.com/7-11 Login
Kaydengodly
The Potter Enterprise from Coudersport, Pennsylvania
Cumberland Maryland Craigslist
Nm Remote Access
Kentucky Downs Entries Today
Monticello Culver's Flavor Of The Day
World of White Sturgeon Caviar: Origins, Taste & Culinary Uses
Zoebaby222
How Quickly Do I Lose My Bike Fitness?
zopiclon | Apotheek.nl
RBT Exam: What to Expect
Dallas’ 10 Best Dressed Women Turn Out for Crystal Charity Ball Event at Neiman Marcus
Char-Em Isd
Daily Voice Tarrytown
Palm Coast Permits Online
Skyward Login Jennings County
Elemental Showtimes Near Cinemark Flint West 14
Costco Great Oaks Gas Price
Full Standard Operating Guideline Manual | Springfield, MO
X-Chromosom: Aufbau und Funktion
Amazing Lash Studio Casa Linda
Craigslist Houses For Rent In Milan Tennessee
Knock At The Cabin Showtimes Near Alamo Drafthouse Raleigh
Dr. Nicole Arcy Dvm Married To Husband
New Stores Coming To Canton Ohio 2022
Craftybase Coupon
Jazz Total Detox Reviews 2022
Roseann Marie Messina · 15800 Detroit Ave, Suite D, Lakewood, OH 44107-3748 · Lay Midwife
Rek Funerals
Best Restaurants Ventnor
R/Mp5
Baldur's Gate 3 Dislocated Shoulder
Minecraft Jar Google Drive
Tyler Sis 360 Boonville Mo
Craigslist Red Wing Mn
Soulstone Survivors Igg
Evil Dead Rise (2023) | Film, Trailer, Kritik
Gold Dipping Vat Terraria
Easy Pigs in a Blanket Recipe - Emmandi's Kitchen
Who Is Responsible for Writing Obituaries After Death? | Pottstown Funeral Home & Crematory
Ladyva Is She Married
Hkx File Compatibility Check Skyrim/Sse
Leland Nc Craigslist
Natasha Tosini Bikini
Does Target Have Slime Lickers
Love Words Starting with P (With Definition)
Dyi Urban Dictionary
Basic requirements | UC Admissions
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 6398

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.