TGT-ADMIN(8)

πŸ‘‘ TGT-ADMIN(8) β€” the tgt-admin glow-up πŸŽ€

okay bestie, so this is the manual page for tgt-admin, section 8 of the manual (that's the sysadmin-commands girlies πŸ’…). Everything you need is right here, no cap.


✨ NAME ✨

tgt-admin β€” Linux SCSI Target Configuration Tool

Like, literally the tool that lets you configure targets and luns persistently. She's giving main character energy in the SCSI target world. πŸ¦‹


🌸 SYNOPSIS 🌸

tgt-admin [-e --execute] [--delete <value>] [--offline <value>]
          [--ready <value>] [-s --show] [-C --control-port <NNNN>]
          [-c --conf <file>] [--ignore-errors] [-f --force]
          [-p --pretend] [--dump] [-v --verbose] [-h --help]

So many flags, so little time, iykyk. 🫢


πŸ’– DESCRIPTION πŸ’–

tgt-admin is a utility which allows a persistent configuration of targets and luns. That's the whole vibe. ✨ She uses tgtadm commands under the hood to create, delete and show targets β€” so yes, she's got a whole team behind her, but she's the one running the group chat.


πŸŽ€ OPTIONS πŸŽ€

  • -e, --execute β€” Reads /etc/tgt/targets.conf and executes tgtadm commands. Lowkey important detail: if the target already exists, it won't be processed. Like, she's not gonna double-work a target that's already there. Check --update if that's what you wanted. πŸ™ˆ
  • -d, --delete <value> β€” Deletes all or selected targets. But bestie, listen: the target will be deleted only if it's not used (aka no initiator is connected to it). It's giving "respect the boundaries." 🚫

If you want to delete targets which are in use, you have to add the "--force" flag. Yes, we're going there. πŸ’€

Example usage:

--delete ALL            - delete all targets
--delete tid=4          - delete target 4
                          (target with tid 4)
--delete iqn.2008-08.com.example:some.target
                        - delete this target
  • --offline β€” Puts all or selected targets in offline state. She's taking a nap, don't @ her. 😴

Example usage:

--offline ALL           - offline all targets
--offline tid=4         - offline target 4
                          (target with tid 4)
--offline iqn.2008-08.com.example:some.target
                        - offline this target
  • --ready β€” Puts all or selected targets in ready state. She's back, refreshed, glowing. ✨

Example usage:

--ready ALL             - ready all targets
--ready tid=4           - ready target 4
                          (target with tid 4)
--ready iqn.2008-08.com.example:some.target
                        - ready this target
  • --update <value> β€” Updates all or selected targets. Same rule as delete, bestie: the target will be updated only if it's not used (no initiator is connected to it). 🀞

If you want to update targets which are in use, you have to add the "--force" flag. Yeah, that flag is doing a LOT of heavy lifting on this page. πŸ’ͺ

Example usage:

--update ALL             - ready all targets
--update tid=4           - ready target 4
                           (target with tid 4)
--update iqn.2008-08.com.example:some.target
                         - update this target
  • -s, --show β€” Shows all the targets. Just, like, a full tour of the situation. πŸ‘€
  • -C, --control-port <NNNN> β€” Okay so this is actually iconic: it is possible to run multiple concurrent instances of tgtd on a host. This argument is used to control which instance the tgt-admin command will operate on. Pick your fighter. πŸ₯Š
  • -c, --conf <configuration file> β€” Specifies an alternative configuration file instead of /etc/tgt/targets.conf, which is the default. She's flexible like that. 🧚
  • --ignore-errors β€” Continues even if tgtadm exits with non-zero code. She's choosing peace. πŸ•ŠοΈ
  • -f, --force β€” Forces some operations even if the target is in use. The "I said what I said" flag. πŸ”₯
  • -p, --pretend β€” Only prints tgtadm options which would be used; doesn't execute any actions. Assumes -v. It's a dress rehearsal, not the actual show. 🎭
  • --dump β€” Dumps current tgtd configuration. Note: it does not include detailed parameters, like write caching. So don't come for her when the details aren't there, she told you upfront. πŸ’€
  • -v, --verbose β€” Increases verbosity (shows tgtadm commands used). She's telling you everything, bestie. πŸ—£οΈ
  • -h, --help β€” Displays a list of available options and exits. The classic "wait what are my options again" move. πŸ™‹β€β™€οΈ

πŸ¦‹ FILES πŸ¦‹

  • /etc/tgt/targets.conf β€” Configuration file for tgt-admin.
  • /usr/share/doc/tgt/targets.conf.example β€” Example configuration file for tgt-admin. Study it, it's literally the blueprint. πŸ““

🌈 SEE ALSO 🌈

targets.conf(5), tgtd(8), tgtadm(8), tgtimg(8), tgt-setup-lun(8).

https://github.com/fujita/tgt

The whole friend group, plus the link. Go click it. πŸ‘‘


πŸ’œ REPORTING BUGS πŸ’œ

Found something cursed? Report bugs to <stgt@vger.kernel.org>. Be nice about it, they're doing their best. 🫢


ngl that was a lot of flags, but you ate that. periodt. πŸ’…

β€” with love, from the [FIXME: source] edition, dated 11/01/2026 πŸŽ€βœ¨

πŸ“¦ where this page comes from