CLI Basics
CLI Basics
Alongside the web interface, StorONE ships a command-line interface (CLI) for managing the system —— the same one this documentation shows in every Using the CLI section throughout. This chapter is a quick orientation to the CLI session itself: how to read a command's usage syntax, and the handful of session-management commands you'll use in every CLI session regardless of what else you're doing.
Reading command syntax
Every command in this documentation includes a Usage block showing exactly how to type it, using a compact, consistent convention (this is the same convention used by most command-line tools, sometimes called "docopt style"):
| Syntax | Meaning |
|---|---|
<name> |
A value you supply |
--option=<value> |
A named option that takes a value, e.g. --capacity=2TB. |
--flag |
A named option that's just a switch, with no value |
[...] |
Optional |
a|b |
Choose exactly one of the alternatives separated by |. |
(a b) |
Parentheses group things together, usually so a | or [...] applies to the whole group at once rather than just one part of it. |
<value...> |
A list |
For example, the volume creation command's usage line:
applications volumes create --application=<name> --volume=<name> --capacity=<capacity> --pool=<name> --n=<n> --k=<k> [--sectorSize=<sectorSize>] [--force]
means: --application, --volume, --capacity, --pool, --n, and --k are all required and each takes a value you supply; --sectorSize and --force are optional.
The options table underneath each usage block then explains what each individual option actually does.
Checking versions
Shows the version of each StorONE component —— the CLI/API itself, the platform running on each node, and the backend service. Handy when confirming what you're running before opening a support case, or checking whether an upgrade completed. This is a CLI/API-only command; component versions are visible elsewhere in the web interface (for example, on the system/node details pages) rather than through an equivalent command.
Using the CLI
version
This command takes no parameters.
Refreshing autocompletion data
The CLI caches the lists it uses for autocompletion and validation —— the names of your applications, volumes, pools, users, and so on —— so that pressing Tab or validating a command doesn't have to query the system every time. That cache normally updates itself automatically as you make changes, but if you've made changes from another session (the web interface, another CLI session, or the REST API) and want to be sure your current session sees them immediately, run this to force a refresh.
Using the CLI
refresh
This command takes no parameters.
Clearing the screen
Clears the CLI terminal, the same as your shell's clear/cls.
Using the CLI
clear
This command takes no parameters.
Logging out
Ends your current login session. You'll need to log in again —— with your username and password, or your LDAP credentials —— to run further commands.
Using the CLI
logout
This command takes no parameters.
Exiting the CLI
Closes the CLI application entirely, ending the session and returning you to your operating system's shell.
Using the CLI
exit
This command takes no parameters.
Next: CLI Productivity Tools —— aliases, search, scripting, and more for getting things done faster in the CLI.