TGTD(8)
π TGTD(8) β the SCSI Target Daemon, but make it make sense
okay bestie, welcome to tgtd(8) β that's the manual page for tgtd, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
tgtd β literally The SCSI Target Daemon. that's the whole name. iconic.
β¨ SYNOPSIS β¨
tgtd
tgtd [-C --control-port <INTEGER>] [-d --debug <INTEGER>]
[-f --foregound] [-h --help] [--iscsi <...>]
(and yes, --foregound is spelled like that in the synopsis β not me, don't come for me π the OPTIONS section below says --foreground. both appear in the original. keep your eyes peeled.)
β¨ DESCRIPTION β¨
So Tgtd is a SCSI Target daemon. it's out here providing SCSI target service to a network β like, that's its whole job, no cap. the most common service it does is iSCSI, but other services are supported too. it's giving main character energy in your storage stack π
β¨ DEVICE TYPES β¨
Tgtd supports both emulated devices and passthrough of real devices. obsessed.
Here's what it can emulate π
diskβ Normal disk device. Emulates a SCSI harddisk.tapeβ Tape device. Emulates a SCSI tape drive.cdβ CD device. Emulates a SCSI DVD burner.changerβ Media changer. Emulate the changer device for a virtual tape library or DVD jukebox.
β¨ OPTIONS β¨
-d --debug <INTEGER>β set this to a non-zero value and you get additional debugging messages logged. little treat for when you're snooping π-f --foregroundβ runs the daemon in the foreground. no backgrounding, she's right there with you.-h --helpβ prints help text to the screen. the classic.-C --control-port <INTEGER>β okay so this comamnd is used to specify the control port to use for this instance oftgtd. the whole point? it lets you run multiple instances of TGTD on a host π
and TGTADM has a matching argument so you can control which instance you connect to. matching set, cute π
--iscsi <...>β iSCSI specific options. peep the ISCSI section below for the options specific to this frontend π
β¨ ISCSI OPTIONS β¨
these parameters apply only to the iSCSI frontend. fyi π¦
portal=<ip-address[:port]>
this one binds tgtd to a specific ip-address/portal and/or port. by default tgtd binds to port 3260 on the wildcard address β
the ip-address part (the bit before the ":") can be missing β that's how you designate the wildcard address with a none-default port.
example: to bind tgtd to a specific address and port
tgtd --iscsi portal=192.0.2.1:3260
example: to bind tgtd to any address but a none-default port
tgtd --iscsi portal=:3251
nop_interval=<integer>
sets the default interval for sending NOP-OUT to probe for connected initiators π heads up though: this parameter only controls the default value for targets β individual targets can be controlled using tgtadm.
default value is 0, which means the feature is disabled β TGTD will not send any NOP-OUT probes. so like, nothing happens unless you opt in π«Ά
nop_count=<integer>
sets the default for after how many failed probes TGTD will consider the initiator dead and tear down the session π same deal: this only controls the default value for targets, and individual targets can be controlled using tgtadm.
default value is 0.
example: send NOP-OUT every 5 seconds and abort the session after 6 failures
tgtd --iscsi portal=192.0.2.1:3260,nop_interval=5,nop_count=6
β¨ ENVIRONMENT VARIABLES β¨
TGT_IPC_SOCKET=<path>
when you set this, tgtd and tgtadm will use the specified path as the IPC socket instead of the default:
/var/run/tgtd/socket.0
that's it. that's the whole env var. slay β¨
β¨ SEE ALSO β¨
targets.conf(5), tgtadm(8), tgt-admin(8), tgtimg(8), tgt-setup-lun(8) β go read those next, bestie, they're the whole friend group π
also: https://github.com/fujita/tgt
β¨ COPYRIGHT/LICENSE β¨
this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details. β οΈ
you should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/.
k bye ily, go configure some targets π this has been [FIXME: source], dated 11/01/2026 β the TGTD(8) page, now with 100% more personality and 0% fewer facts πβ¨
π¦ where this page comes from
- alpine 3.24: scsi-tgt-doc 1.0.98-r0 Β· GPL-2.0-only
- arch rolling: tgt 1.0.98-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms