Score:0

How to run tgtadm correct?

gl flag

Trying to run tgtadm (following some examples e.g. here) and not having much luck:

$ tgtadm –-mode target –-op show
tgtadm: unrecognized option '–-mode'
$ tgtadm --lld iscsi –-mode target –-op show
tgtadm: unrecognized option '–-mode'
Try `tgtadm --help' for more information.
$ apt list --installed | grep tgt

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

tgt/jammy,now 1:1.0.80-1ubuntu2 amd64 [installed]

What am I doing wrong? I.e. what is the right way to run tgtadm?

Context:

  • I am new to Ubuntu (did spend some time with CentOS in the years past) - please be gentle
  • Inherited a Dell r730 server running Ubuntu 22.04.3 LTS with the sole purpose of being an iSCSI storage device for several VMware ESXi hosts. It's having issues: some ESXi hosts can see it, and come can't - and while the issue may be outside of the server, I'd like to get the hang of how iSCSI target are configured on it, and how to properly make changes if needed.
Score:0
gl flag

Turns out it's the m-dashes (vs. regular hyphens) - the commands in the question have those m-dashes. Copy-pasting them outside of a code block reveals the issue:

tgtadm –-mode target –-op show

Once replaced with standard hyphens, the command no longer flags bad syntax:

$ tgtadm --mode target --op show
tgtadm: failed to send request hdr to tgt daemon, Transport endpoint is not connected
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.