1TGT-SETUP-LUN(8)                [FIXME: manual]               TGT-SETUP-LUN(8)
2
3
4

NAME

6       tgt-setup-lun - Helper script that creates a target, adds a device to
7       the target, and defines initiators that can connect to the target
8

SYNOPSIS

10       tgt-setup-lun -d <device> -n <targetname> [-b <bsname>]
11                     [-t <transport>] [-C <control_port>] [initiator_IP...]
12                     [-h]
13

DESCRIPTION

15       Creates a target according to the supplied target_name. tgtd must be
16       running. The format of the default IQN generated from the target name
17       is: "iqn.2001-04.com.<hostname>-<target_name>", or a complete IQN may
18       be given. The target name must be unique.
19
20       The script then adds the requested device to the target. If specific IP
21       addresses are defined, it adds them to the list of allowed initiators
22       for that target. If no IP addresses is defined, it defines that the
23       target accepts any initiator.
24

EXAMPLES

26       Create a target that uses /dev/sdb1 and allows connections only from
27       192.168.10.81:
28
29                 tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81
30
31
32       Create a target that uses /dev/sdb1 and allows connections only from
33       192.168.10.81 and 192.168.10.82:
34
35                 tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82
36
37
38       Create a target that uses /dev/sdb1 and allows connections from any
39       initiator:
40
41                 tgt-setup-lun -d /dev/sdb1 -n my_target
42
43
44       Display help:
45
46                 tgt-setup-lun -h
47
48

AUTHOR

50       Written by Erez Zilber
51

SEE ALSO

53       targets.conf(5), tgtd(8), tgtadm(8), tgtimg(8), tgt-admin(8).
54       http://stgt.sourceforge.net/
55

REPORTING BUGS

57       Report bugs to <stgt@vger.kernel.org>
58
60       Copyright © Voltaire Ltd. 2008.
61
62
63
64[FIXME: source]                   01/27/2021                  TGT-SETUP-LUN(8)
Impressum