Managing services with storpool_ctl
storpool_ctl
is a helper tool providing an easy way to perform an action for
all installed services on a StorPool node. You can use it to start, stop, or
restart services, or enable/disable starting them on boot. For more information
about the services themselves, see Background services.
Nodes in a StorPool cluster might have different sets of services installed,
depending on the environment, or whether the node is client, a server, converged
node (both) or if services are added or removed. Using storpool_ctl
you can
set the services needed for each node as needed. Here are some typical use cases:
Querying for the status of all services installed on a node.
Starting and enabling all services. This usually happens right after a new installation.
The opposite case, where all services have to be disabled/stopped when a node is being uninstalled or moved to a different location.
When a client-only node is promoted to a server (often referred to as a converged node). In this case after initializing all the drives on this node the tool will take care to start/enable all required additional services.
The storpool_ctl
tool is available in StorPool starting with the
19.2 revision 19.01.1991.f5ec6de23 release.
Supported actions
To list all supported actions use:
# storpool_ctl --help
usage: storpool_ctl [-h] {disable,start,status,stop,restart,enable} ...
Tool that controls all StorPool services on a node, taking care of
service dependencies, required checks before executing an action and
others.
positional arguments:
{disable,start,status,stop,restart,enable}
action
optional arguments:
-h, --help show this help message and exit
Getting status
List the status of all services installed on this node:
# storpool_ctl status
storpool_nvmed not_running
storpool_mgmt not_running
storpool_reaffirm not_running
storpool_flushwbc not_running
storpool_stat not_running
storpool_abrtsync not_running
storpool_block not_running
storpool_kdump not_running
storpool_hugepages not_running
storpool_bridge not_running
storpool_beacon not_running
storpool_cgmove not_running
storpool_iscsi not_running
storpool_server not_running
storpool_controller not_running
The status is always one of:
not_running
when the service is disabled or stoppednot_enabled
when the service is running but is not yet enabledrunning
when the service is running and enabled
Note
The tool always prints the status after any selected action was applied.
You can also use storpool_ctl status --problems
, which shows only services
that are not in running state. Note that in this mode the utility exits with
non-zero exit status in case there are any installed services in not_running
or not_enabled
state.
# storpool_ctl status --problems
storpool_mgmt not_running
storpool_server not_enabled
# echo $?
1
Starting services
To start all services:
# storpool_ctl start
cgconfig running
storpool_abrtsync not_enabled
storpool_cgmove not_enabled
storpool_block not_enabled
storpool_mgmt not_enabled
storpool_flushwbc not_enabled
storpool_server not_enabled
storpool_hugepages not_enabled
storpool_stat not_enabled
storpool_controller not_enabled
storpool_beacon not_enabled
storpool_kdump not_enabled
storpool_reaffirm not_enabled
storpool_bridge not_enabled
storpool_iscsi not_enabled
Enabling services
Note
The services should be enabled after the configuration of cgroups is completed. For more information, see Control groups.
To enable all services:
# storpool_ctl enable
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_cgmove.service to /usr/lib/systemd/system/storpool_cgmove.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_bridge.service to /usr/lib/systemd/system/storpool_bridge.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_block.service to /usr/lib/systemd/system/storpool_block.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_reaffirm.service to /usr/lib/systemd/system/storpool_reaffirm.service.
Created symlink from /etc/systemd/system/storpool_beacon.service.wants/storpool_reaffirm.service to /usr/lib/systemd/system/storpool_reaffirm.service.
Created symlink from /etc/systemd/system/storpool_block.service.wants/storpool_reaffirm.service to /usr/lib/systemd/system/storpool_reaffirm.service.
Created symlink from /etc/systemd/system/storpool_mgmt.service.wants/storpool_reaffirm.service to /usr/lib/systemd/system/storpool_reaffirm.service.
Created symlink from /etc/systemd/system/storpool_server.service.wants/storpool_reaffirm.service to /usr/lib/systemd/system/storpool_reaffirm.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_controller.service to /usr/lib/systemd/system/storpool_controller.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_beacon.service to /usr/lib/systemd/system/storpool_beacon.service.
Created symlink from /etc/systemd/system/storpool_server.service.wants/storpool_beacon.service to /usr/lib/systemd/system/storpool_beacon.service.
Created symlink from /etc/systemd/system/storpool_block.service.wants/storpool_beacon.service to /usr/lib/systemd/system/storpool_beacon.service.
Created symlink from /etc/systemd/system/storpool_mgmt.service.wants/storpool_beacon.service to /usr/lib/systemd/system/storpool_beacon.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_kdump.service to /usr/lib/systemd/system/storpool_kdump.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_abrtsync.service to /usr/lib/systemd/system/storpool_abrtsync.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_mgmt.service to /usr/lib/systemd/system/storpool_mgmt.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_server.service to /usr/lib/systemd/system/storpool_server.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_flushwbc.service to /usr/lib/systemd/system/storpool_flushwbc.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_stat.service to /usr/lib/systemd/system/storpool_stat.service.
Created symlink from /etc/systemd/system/sysinit.target.wants/storpool_hugepages.service to /usr/lib/systemd/system/storpool_hugepages.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/storpool_iscsi.service to /usr/lib/systemd/system/storpool_iscsi.service.
storpool_cgmove running
storpool_bridge running
storpool_block running
storpool_reaffirm running
storpool_controller running
storpool_beacon running
storpool_kdump running
storpool_abrtsync running
storpool_mgmt running
storpool_server running
storpool_flushwbc running
storpool_stat running
storpool_hugepages running
storpool_iscsi running
Disabling services
To disable all services (without stopping them):
# storpool_ctl disable
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_cgmove.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_bridge.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_block.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_reaffirm.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_controller.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_beacon.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_kdump.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_abrtsync.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_mgmt.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_server.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_flushwbc.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_stat.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/storpool_iscsi.service.
Removed symlink /etc/systemd/system/sysinit.target.wants/storpool_hugepages.service.
Removed symlink /etc/systemd/system/storpool_beacon.service.wants/storpool_reaffirm.service.
Removed symlink /etc/systemd/system/storpool_block.service.wants/storpool_reaffirm.service.
Removed symlink /etc/systemd/system/storpool_block.service.wants/storpool_beacon.service.
Removed symlink /etc/systemd/system/storpool_mgmt.service.wants/storpool_reaffirm.service.
Removed symlink /etc/systemd/system/storpool_mgmt.service.wants/storpool_beacon.service.
Removed symlink /etc/systemd/system/storpool_server.service.wants/storpool_reaffirm.service.
Removed symlink /etc/systemd/system/storpool_server.service.wants/storpool_beacon.service.
storpool_kdump not_enabled
storpool_hugepages not_enabled
storpool_bridge not_enabled
storpool_controller not_enabled
storpool_beacon not_enabled
storpool_cgmove not_enabled
storpool_block not_enabled
storpool_mgmt not_enabled
storpool_stat not_enabled
storpool_reaffirm not_enabled
storpool_server not_enabled
storpool_flushwbc not_enabled
storpool_abrtsync not_enabled
storpool_iscsi not_enabled
Stopping services
To stop all services:
# storpool_ctl stop
storpool_server not_running
storpool_iscsi not_running
storpool_controller not_running
storpool_mgmt not_running
storpool_cgmove not_running
storpool_kdump not_running
storpool_reaffirm not_running
storpool_stat not_running
storpool_beacon not_running
storpool_hugepages not_running
storpool_flushwbc not_running
storpool_block not_running
storpool_bridge not_running
storpool_abrtsync not_running
Module storpool_pci version 6D0D7D6E357D24CBDF2D1BA
Module storpool_disk version D92BDA6C929615392EEAA7E
Module storpool_bd version C6EB4EEF1E0ABF1A4774788
Module storpool_rdma version 4F1FB67DF4617ECD6C472C4
The stop
action features the options:
- --servers
Stop just the server instances.
- --expose-nvme
Expose any configured NVMe devices attached to the selected
SP_NVME_PCI_DRIVER
back to thenvme
driver.