1TARGETS(5)                  BSD File Formats Manual                 TARGETS(5)
2

NAME

4     targets — configuration file for iSCSI targets
5

SYNOPSIS

7     targets
8

DESCRIPTION

10     The targets file describes the iSCSI storage which is presented to iSCSI
11     initiators by the iscsi-target(8) service.  A description of the iSCSI
12     protocol can be found in Internet Small Computer Systems Interface RFC
13     3720.
14
15     Each line in the file (other than comment lines that begin with a ‘#’)
16     specifies an extent, a device (made up of extents or other devices), or a
17     target to present to the initiator.
18
19     Each definition, an extent, a device, and a target, is specified on a
20     single whitespace delimited line.
21
22     The extent definition specifies a piece of storage that will be used as
23     storage, and presented to initiators.  It is the basic definition for an
24     iSCSI target.  Each target must contain at least one extent definition.
25     The first field in the definition is the extent name, which must begin
26     with the word “extent” and be followed by a number.  The next field is
27     the file or NetBSD device which will be used as persistent storage.  The
28     next field is the offset (in bytes) of the start of the extent.  This
29     field is usually 0.  The fourth field in the definition is the size of
30     the extent.  The basic unit is bytes, and the shorthand KB, MB, GB, and
31     TB can be used for kilobytes (1024 bytes), megabytes (1024 kilobytes),
32     gigabytes (1024 megabytes), and terabytes (1024 gigabytes) respectively.
33     It is possible to use the word “size” to use the full size of the pre-
34     existing regular file given in the extent name.
35
36     The device definition specifies a LUN or device, and is made up of
37     extents and other devices.  It is possible to create hierarchies of
38     devices using the device definition.  The first field in the definition
39     is the device name, which must begin with the word “device” and be fol‐
40     lowed by a number.  The next field is the type of resilience that is to
41     be provided by the device.  For simple devices, RAID0 suffices.  Greater
42     resilience can be gained by using the RAID1 resilience field.  Following
43     the resilience field is a list of extents or other devices.  Large
44     devices can be created by using multiple RAID0 extents, in which case
45     each extent will be concatenated.  Resilient devices can be created by
46     using multiple RAID1 devices or extents, in which case data will be writ‐
47     ten to each of the devices or extents in turn.  If RAID1 resilience is
48     used, all the extents or sub-devices must be the same size.  Please note
49     that RAID1 recovery is not yet supported by the iscsi-target(8) utility.
50     An extent or sub-device may only be used once.
51
52     The target definition specifies an iSCSI target, which is presented to
53     the iSCSI initiator.  Multiple targets can be specified.  The first field
54     in the definition is the target name, which must begin with either of the
55     words “target” or “lun” and be followed by a number.  Optionally, if a
56     target is followed by an “=” sign and some text, the text is taken to be
57     that of the iSCSI Qualified Name of the target.  This IQN is used by the
58     initiator to connect to the appropriate target.  The next field is a
59     selector for whether the storage should be presented as writable, or
60     merely as read-only storage.  The field of “rw” denotes read-write stor‐
61     age, whilst “ro” denotes read-only storage.  The next field is the device
62     or extent name that will be used as persistent storage for this target.
63     The fourth field is a slash-notation netmask which will be used, during
64     the discovery phase, to control the network addresses to which targets
65     will be presented.  The magic values “any” and “all” will expand to be
66     the same as “0/0”.  If an attempt is made to discover a target which is
67     not allowed by the netmask, a warning will be issued using syslog(3) to
68     make administrators aware of this attempt.  The administrator can still
69     use tcp wrapper functionality, as found in hosts_access(5) and
70     hosts.deny(5) to allow or deny discovery attempts from initiators as well
71     as using the inbuilt netmask functionality.
72

FILES

74     /etc/iscsi/targets  the list of exported storage targets
75

SEE ALSO

77     syslog(3), hosts_access(5), hosts.deny(5), iscsi-target(8)
78

HISTORY

80     The targets file first appeared in NetBSD 4.0.
81
82BSD                            December 18, 2007                           BSD
Impressum