Manage Storage

SolidGroundUX DocumentationSolidGroundUX
NL

Configure, reconcile, validate, and manage local storage volumes and directories

Source: target-root/usr/local/libexec/solidgroundux/manage-storage.sh

Configure, reconcile, validate, and manage local storage volumes and directories

Public functions

Internal functions
FunctionPurposeArgumentsOutput
_storage_validate_deviceValidate that a selected path is an unused whole block device.- $1: Optional: block-device path.—
_storage_validate_mountpointValidate an absolute mount-point path.- $1: Optional: filesystem mountpoint.—
_storage_list_mountpointsList all SolidGroundUX-managed storage mount points.——
_storage_mountpoint_is_managedValidate a managed storage mount point.- $1: Optional: Mountpoint to check against the managed set.—
_storage_select_mountpointSelect one managed storage volume.- $1: Name of the shell variable receiving the result.—
_storage_save_configurationPersist the complete managed mount-point set.——
_storage_get_configured_mountpointsRead persisted managed mount points.——
_storage_list_labeled_volumesList every filesystem labelled SGND_STORAGE.—DEVICE\
_storage_get_mountpointResolve the mountpoint associated with a managed block device or storage entry.——
_storage_dryrun_completeReport that a storage dry run made no changes.——
_storage_list_managed_fstab_entriesReturn fstab entries that are explicitly owned by SolidGroundUX storage.—One line per managed entry as: SOURCE\
_storage_list_stale_managed_fstab_entriesList invalid/stale managed entries.——
_storage_list_unused_disksList whole disks that do not currently contain mounted filesystems.—(stdout):
_storage_partition_pathReturn the first partition belonging to a disk after partitioning.- $1: Block-device path.(stdout):
_storage_validate_accountValidate that a local or directory-backed user account can be resolved.- $1: Optional: account name.—
_storage_validate_groupValidate that a local or directory-backed group can be resolved.- $1: Optional: group name.—
_storage_validate_modeValidate a three- or four-digit octal filesystem mode.- $1: Octal permission mode.—
_storage_select_access_targetsSelect one, several, or all managed storage roots.- $1: Name of the shell variable receiving the result.—
_storage_validate_directory_nameAccept a simple directory name that can safely be joined below a managed storage root.- $1 — Proposed direct child directory name.—
_storage_list_child_directoriesReturn only the first-level directories below a mounted SolidGroundUX storage root.- $1 — Mounted managed storage root.One directory basename per line, sorted alphabetically.
_storage_select_child_directoryPresent the first-level directories below a managed storage root and return the selected name.- $1 — Output variable name.—
_storage_action_againOffer to repeat the completed storage action.——
_storage_virtiofs_validate_tagAccept only unambiguous VirtioFS mount tags safe for fstab and mount arguments.- $1: VirtioFS tag advertised by the hypervisor.—
_storage_virtiofs_list_tagsList the tags exposed by the Linux virtiofs driver, without guessing host paths.——
_storage_virtiofs_validate_targetReject mountpoints that could be ambiguous, non-canonical, or unsafe in fstab.- $1: Absolute destination directory.—
_storage_virtiofs_fstab_entriesDetect existing or conflicting configuration without touching unrelated fstab rows.- $1: VirtioFS tag.—
_run_actionDispatch the requested management action to its implementation.- $1: Management action to execute.—

Description

Implements persistent local-storage management actions exposed by the 15-storage Management Console module.

Usage

Run the executable from its shell command (or installed wrapper):

manage-storage --action status
manage-storage --action reconcile
manage-storage --dryrun --action reconcile

Script-specific options:

  • --action NAME, -a: Management action (supported actions: provision, configure, mount, unmount, expand, reconcile, reconcile-persistence, validate, status, directories, virtiofs-add, access-status, set-access, restore-defaults).