Przejdź do głównej zawartości

Catalog of commands

The command program of the server Qubix is installed on holds the commands below. The Commands tab lists the same commands, because the program sends its list. Each command has a title, which the panel shows, and a code, which stands under the title in small type and in the journal.

A watching command runs at once and reads. A changing command comes through the check pass, runs as a job in a separate unit of the system, which survives a restart of the program, and the program checks its result afterwards. Only one changing command runs at a time. Every command has a time limit; a watching command that exceeds it ends in the state timed out. A command that is queued when the program restarts ends in the state interrupted.

Watching commands​

CommandFieldsWhat it doesTime limit
Hardware inventory (inventory)—Models, serial numbers, firmware and slots of the parts. It reads the data of the board and the memory, the table of block devices, the list of PCI devices, the network ports and the NVMe controllers. It also remembers the serial numbers of the disks that were members of an array, so that Prepare the new disk can recognize an old disk5 minutes
Disk SMART (disk_smart)DiskSMART and the error log of one disk. For an NVMe disk: the SMART log, the error log, the identity of the controller and the smartctl report. For a SATA disk: the extended smartctl report and the standard one1 minute
Disk self-test (disk_selftest)Disk, Kind (Short or Long)A self-test of a disk. Changes no data and waits while an array is rebuilt. It starts the self-test of the disk and reads the self-test log. Runs as a job2 minutes
Array state (raid_detail)ArrayThe state of an array and its members. It reads the list of arrays of the system, the details of the array and the record of every member1 minute
Boot (boot_info)—Boot mode, boot entries, the loader on the disks, previous boots. The result names the boot mode, EFI or BIOS; in EFI mode it lists the boot entries, in BIOS mode it checks the first sector of every disk for the loader; it also lists the earlier boots and the records that the crash store holds1 minute
Network check (net_diag)Network port (optional)Port counters, loss and latency to the gateway. It reads the counters of the port, sends 20 packets to the gateway and runs the route report to the gateway with 50 packets, as text and as data. Runs as a job5 minutes
Service state (service_status)ServiceThe state of a service and its log. It shows the status of the service and the last 200 lines of its log1 minute
Disk space (space_report)—Space and inodes per file system, large folders. It reads the free space and the free inodes of every file system, the size of the folders of the container engine, of Qubix and of the logs, and the size of the system journal10 minutes
Available updates (os_updates)—Available updates and whether a restart is needed. It simulates an upgrade that may bring new packages, such as a new kernel, and reports whether the server asks for a restart5 minutes
Log excerpt (journal_excerpt)From (ms), To (ms), Keep addresses (optional)System and kernel log lines for a time span. The excerpt holds the lines of the kernel and of the services of the hardware (the array monitor, the disk monitor, the device manager). Addresses of e-mail, IP addresses and domain names are replaced with a mark, except the addresses named in Keep addresses; a line that looks like a secret is dropped1 minute

The services of Service are docker, containerd, systemd-timesyncd, ssh and systemd-journald.

Changing commands​

Each changing command returns, at the check pass, the exact lines it will run. All of them end in the journal of Server actions.

Irreversible

A changing command works on the real server. Prepare the new disk writes the partition table of the healthy disk onto the disk named in the field Disk, Free up space deletes cached packages and unused images, and Restart the server restarts the server. Read the fields and the lines of the check pass before the click on the red button.

CommandFieldsWhat it doesTime limit
Remove the disk from the array (raid_fail_remove)Array, PartitionTakes a partition out of an array before the disk is replaced. It marks the partition faulty and removes it from the array in one step1 minute
Prepare the new disk (disk_prepare_new)Disk (the new disk), Healthy diskLays out the new disk after the healthy one. It copies the partition table of the healthy disk to the new one; a GPT table gets new unique identifiers. The result counts the partitions of both disks2 minutes
Add the disk to the array (raid_add)Array, PartitionAdds a partition of the new disk to an array. It adds the partition, then raises the speed of the rebuild for its duration when the server holds the script for it1 minute
Return the partition to the array (raid_re_add)Array, PartitionReturns a dropped but healthy partition to an array.1 minute
Install the boot loader (boot_install)DiskInstalls the boot loader on a disk. In BIOS mode the program installs the loader on the disk. In EFI mode on a server where each disk keeps its own EFI partition, the program fills the EFI partition of the disk: it formats the partition when it is empty and copies the loader and the kernel images from the EFI partition of the other disk of the array. On a server that keeps the EFI partition inside an array, the copy is unnecessary. In EFI mode the program then creates the boot entries of Qubix, places them right after the network entry in the boot order and removes the old entries; the network entry stays first5 minutes
Check the array (raid_check)ArrayAn array check without repairs. It starts the check mode of the array1 minute
Restart the service (service_restart)ServiceRestarts a service from the list.1 minute
Free up space (space_cleanup)—Removes the package cache and images without a name. It cleans the cache of packages and prunes the unused images and the build cache of the container engine30 minutes
Install security updates (os_security_updates)—Updates from the security source of the system, without a restart. It refreshes the package lists and installs the packages that a simulated upgrade takes from the security source, a new kernel among them; the configuration files that you edited stay as they are. On the RHEL family the command runs dnf upgrade --security (yum where there is no dnf). The command runs as a job that goes to its end1 hour
Install security updates without the kernel (os_security_updates_no_kernel)—Updates from the security source of the system except the kernel, without a restart. The same as the command above, but the kernel stays as it is: the packages whose name starts with linux- on Debian and Ubuntu, the packages kernel* on the RHEL family. With the switch Install the system's security updates automatically on, Qubix runs it by itself once a day (Settings)1 hour
Restart the server (os_reboot)—Restarts the server. Before the restart the program accepts the current network boot program of Hetzner, so that the server comes up on its own; when the acceptance fails, the restart goes on with the previous signatures1 minute

Conditions of the commands​

The program checks the conditions at the check pass and again right before the run. A failed condition returns a reason (the reasons).

CommandThe server runs it when
Remove the disk from the arrayThe partition is a member of the array, and every other member is in sync, so the array keeps a healthy copy
Prepare the new diskThe new disk differs from the healthy one; its serial number is new to the arrays of this server; its partitions are free of mounts and of array membership; it is as large as the healthy disk or larger; the healthy disk is free of errors; the partition table of the healthy disk is GPT or DOS
Add the disk to the arrayThe array is degraded; the partition is free of an array label, of a mount and of a file system; a healthy member has a partition of the same number on another disk (the layout came from Prepare the new disk); both partitions have one type; the new partition is as large as its twin
Return the partition to the arrayThe disk of the partition reports clean media and a clear critical warning (an NVMe disk), or its SMART self-assessment passes (a SATA disk)
Install the boot loaderThe disk belongs to the array that holds the root. In EFI mode the firmware keeps a network boot entry, the disk has an EFI partition, and a boot entry carries the path of a loader. Where the EFI partition of the disk needs filling, it is empty or holds a file system of the vfat type, a mount point for it is known, and the EFI partition of another disk of the array holds the loader and a kernel image to copy
Check the arrayThe array is idle
Restart the serverEvery array is idle; the backup program is idle; the re-encryption of the disk and the change of the disk protection are over; on an encrypted server every boot image on the EFI partitions carries the signature of Qubix; when an array is degraded, a remaining disk carries a boot loader
Disk self-test (watching)Every array is idle

After a run, the program checks the result itself and returns it with the report: whether the partition left the array, whether the partition counts match, whether the partition joined the array and in which state the rebuild is, how the boot entries and the network entry stand in the boot order.

What's next​