STASADM(1)

πŸ’… STASADM(1) β€” the stasadm manual, but make it make sense

okay bestie, sit down, we're learning stasadm from the STASADM(1) manual page and honestly? it's giving ✨storage appliance services admin✨ and I'm obsessed. this is the glow-up version, same facts, way better vibes πŸŽ€


✨ NAME ✨

stasadm β€” STorage Appliance Services admin functions 🫢


🌸 SYNOPSIS 🌸

stasadm [OPTIONS...] {COMMAND} [OPTIONS...]

πŸ’– DESCRIPTION πŸ’–

so stasadm is the lil tool you use to configure nvme-stas. and where does all that config go? it gets saved to /etc/stas/sys.conf. periodt πŸ’…

now here's the cute part β€” even though nvme-stas keeps its config in /etc/stas/sys.conf, you can still vibe with the config from nvme-cli and libnvme, no drama. nvme-stas lets you save individual parameters like the Host NQN and ID somewhere outside of /etc/stas/sys.conf. like, for example?? you could use the same default Host NQN and ID that nvme-cli and libnvme define in /etc/nvme/hostnqn and /etc/nvme/hostid respectively. iconic tbh 🌈

and how do you tell nvme-stas that's what you want? you just use stasadm's --file=FILE option. that's it. that's the whole trick πŸ¦‹


πŸ‘‘ COMMANDS πŸ‘‘

here's what this baby understands:

  • hostnqn β€” generates the Host NQN ✨ this is typically used as a post-installation step to generate /etc/nvme/hostnqn.

and listen, the NVMe base specifications says: β€œAn NQN is permanent for the lifetime of the host”. for this reason, the host NQN should only be generated if /etc/nvme/hostnqn does not exist already. no take-backs, bestie 😭

  • hostid β€” generates the Host ID ✨ typically used as a post-installation step to generate /etc/nvme/hostid.

now, it's not explicitly specified in the NVMe specifications, but the Host ID, like the Host NQN, should be permanent for the lifetime of the host. so only generate the Host ID if /etc/nvme/hostid does not exist. same energy, same rule πŸ™ˆ

  • set-symname [SYMNAME] β€” sets the host symbolic name πŸŽ€

the symbolic name is an optional parameter that can be used for explicit registration with a discovery controller. optional but slay πŸ’…

  • clear-symname β€” clears the host symbolic name. bye bye πŸ‘‹

πŸ’œ OPTIONS πŸ’œ

here's what this baby understands:

  • -h, --help β€” prints the help text and exits. your lil safety net 🫢
  • --version β€” prints the version string and exits. iykyk ⭐
  • -fFILE, --file=FILE β€” by default, hostnqn and hostid save the values to /etc/stas/sys.conf. this option lets you save to a separate file instead πŸ¦‹

traditionally, nvme-cli and libnvme retrieve the default Host NQN and ID from /etc/nvme/hostnqn and /etc/nvme/hostid respectively. so the --file=FILE option can be used to tell nvme-stas that it should use those same configuration files. matching outfits fr fr πŸ’–


πŸ”₯ EXIT STATUS πŸ”₯

on success, 0 is returned; otherwise, a non-zero failure code is returned. bestie either ate or she didn't πŸ’€


🌈 EXAMPLES 🌈

Example 1. Generate /etc/nvme/hostnqn

$ stasadm hostnqn --file /etc/nvme/hostnqn

Example 2. Generate /etc/nvme/hostid

$ stasadm hostid -f /etc/nvme/hostid

Example 3. Configure the host's symbolic name

$ stasadm set-symname LukeSkywalker

🧚 SEE ALSO 🧚

  • nvme-stas(7) β€” go read it, bestie, it's the prequel ✨

and that's the whole page, no notes πŸ’… this was nvme-stas 2.4.1, the STASADM(1) manual, and honestly? she ate. go generate those permanent IDs responsibly, mwah πŸŽ€πŸ’–πŸŒΈ

πŸ“¦ where this page comes from