targetctl(8)
β¨ targetctl β the manual page bestie π
ok so real talk: this is the targetctl page from the System Manager's Manual (it's a section 8 joint, iykyk), and it's lowkey the most unhinged little script in the whole storage stack. let's get into it π«Ά
πΈ NAME πΈ
targetctl β save and restore the configuration of the kernel target πΎβ¨
π¦ DESCRIPTION π¦
okay so targetctl is a low-level script that saves and restores the configuration of the LIO kernel target, to and from a file in json format. β¨
and like, it is not normally meant to be used by end-users directly, bestie. it's for system init frameworks, or for advanced end-users who are out here generating the configuration file themselves and need a way to load that configuration without relying on the targetcli configuration shell. main character energy for sysadmins only, no cap π
π USAGE π
β οΈ important: targetctl must be invoked as root. no exceptions, she's not asking. π
exit status will be 0 if successful, or nonzero if an error was encountered. simple as that. π
π targetctl save [config-file]
saves the current configuration of the kernel target to a file in json format. π
and bestie, listen β since the file may contain cleartext passwords, the file's permissions will be set to only allow root access. it's giving protective, it's giving secure. π
if config-file is not supplied, targetctl will use the default file location, /etc/target/saveconfig.json. πΎ
π§ targetctl restore [config-file]
removes any existing configuration and replaces it with the configuration described in the file. see saveconfig.json(5) for more details. π
if parts of the configuration could not be restored, those parts will be noted in the error output, and the rest of the configuration will still be applied. so like, partial slay. she does her best. π
π targetctl clear
removes any existing configuration from the running kernel target. poof. gone. π
β targetctl --help
displays usage information. the classic. the icon. π
π SEE ALSO π
π FILES π
/etc/target/saveconfig.json/sys/kernel/config/target
π AUTHOR π
written by Andy Grover <agrover@redhat.com>. man page written by Andy Grover <agrover@redhat.com>.
π REPORTING BUGS π
found a bug? report it via <targetcli-fb-devel@lists.fedorahosted.org> or <https://github.com/open-iscsi/rtslib-fb/issues> β the devs wanna hear from u fr fr π«Ά
and that's the whole page bestie!! this was targetctl(8) from the System Manager's Manual β so if u see targetctl(8) at the bottom of a real man page, that's just her lil signature, her lil watermark, her name tag at the party πβ¨ go be root about it responsibly, mwah ππΈ
π¦ where this page comes from
- centos-stream 10: target-restore 2.1.76-12.el10 Β· Apache-2.0
- centos-stream 9: target-restore 2.1.76-1.el9 Β· ASL 2.0
- fedora 43: target-restore 2.2.3-4.fc43 Β· Apache-2.0
- fedora 43: target-restore 2.2.4-1.fc43 Β· Apache-2.0
- fedora 44: target-restore 2.2.3-5.fc44 Β· Apache-2.0
- fedora 44: target-restore 2.2.4-1.fc44 Β· Apache-2.0
- opensuse-leap 16.0: python-rtslib-fb-common 2.2.2-160000.2.2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms