| TGT-SETUP-LUN(8) | [FIXME: manual] | TGT-SETUP-LUN(8) |
NAME
tgt-setup-lun - Helper script that creates a target, adds a device to the target, and defines initiators that can connect to the target
SYNOPSIS
.HP 336u
tgt-setup-lun
-d <device>
-n <targetname>
[-b <bsname>]
[-t <transport>]
[-C <control_port>]
[initiator_IP...]
[-h]
DESCRIPTION
.PP Creates a target according to the supplied target_name. tgtd must be running. The format of the default IQN generated from the target name is: "iqn.2001-04.com.<hostname>-<target_name>", or a complete IQN may be given. The target name must be unique.
.PP The script then adds the requested device to the target. If specific IP
addresses are defined, it adds them to the list of allowed initiators for
that target. If no IP addresses is defined, it defines that the target
accepts any initiator.
EXAMPLES
.PP Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81:
tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81
.PP Create a target that uses /dev/sdb1 and allows connections only from
192.168.10.81 and 192.168.10.82:
tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82
.PP Create a target that uses /dev/sdb1 and allows connections from any
initiator:
tgt-setup-lun -d /dev/sdb1 -n my_target
.PP Display help:
tgt-setup-lun -h
AUTHOR
.PP Written by Erez Zilber
SEE ALSO
.PP targets.conf(5), tgtd(8), tgtadm(8), tgtimg(8), tgt-admin(8). http://stgt.sourceforge.net/
REPORTING BUGS
.PP Report bugs to <stgt@vger.kernel.org>
COPYRIGHT
.PP Copyright © Voltaire Ltd. 2008.
| 12/12/2025 | [FIXME: source] |