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
- storage_provision
- storage_mount
- storage_unmount
- storage_expand
- storage_manage_directories
- storage_access_status
- Set access in the storage workflow.
- Restore access defaults in the storage workflow.
- storage_reconcile
- storage_reconcile_persistence
- storage_status
- storage_validate_provisioning
- Dispatch command-line options to the appropriate management workflow.
Internal functions
| Function | Purpose | Arguments | Output |
|---|---|---|---|
_storage_validate_device | Validate that a selected path is an unused whole block device. | - $1: Optional: block-device path. | — |
_storage_validate_mountpoint | Validate an absolute mount-point path. | - $1: Optional: filesystem mountpoint. | — |
_storage_list_mountpoints | List all SolidGroundUX-managed storage mount points. | — | — |
_storage_mountpoint_is_managed | Validate a managed storage mount point. | - $1: Optional: Mountpoint to check against the managed set. | — |
_storage_select_mountpoint | Select one managed storage volume. | - $1: Name of the shell variable receiving the result. | — |
_storage_save_configuration | Persist the complete managed mount-point set. | — | — |
_storage_get_configured_mountpoints | Read persisted managed mount points. | — | — |
_storage_list_labeled_volumes | List every filesystem labelled SGND_STORAGE. | — | DEVICE\ |
_storage_get_mountpoint | Resolve the mountpoint associated with a managed block device or storage entry. | — | — |
_storage_dryrun_complete | Report that a storage dry run made no changes. | — | — |
_storage_list_managed_fstab_entries | Return fstab entries that are explicitly owned by SolidGroundUX storage. | — | One line per managed entry as: SOURCE\ |
_storage_list_stale_managed_fstab_entries | List invalid/stale managed entries. | — | — |
_storage_list_unused_disks | List whole disks that do not currently contain mounted filesystems. | — | (stdout): |
_storage_partition_path | Return the first partition belonging to a disk after partitioning. | - $1: Block-device path. | (stdout): |
_storage_validate_account | Validate that a local or directory-backed user account can be resolved. | - $1: Optional: account name. | — |
_storage_validate_group | Validate that a local or directory-backed group can be resolved. | - $1: Optional: group name. | — |
_storage_validate_mode | Validate a three- or four-digit octal filesystem mode. | - $1: Octal permission mode. | — |
_storage_select_access_targets | Select one, several, or all managed storage roots. | - $1: Name of the shell variable receiving the result. | — |
_storage_validate_directory_name | Accept a simple directory name that can safely be joined below a managed storage root. | - $1 — Proposed direct child directory name. | — |
_storage_list_child_directories | Return 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_directory | Present the first-level directories below a managed storage root and return the selected name. | - $1 — Output variable name. | — |
_storage_action_again | Offer to repeat the completed storage action. | — | — |
_run_action | Dispatch 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,access-status,set-access,restore-defaults).
