fn: storage_provision
Purpose
Provision an unused local disk as persistent SolidGroundUX storage, including its initial mount so the new filesystem is immediately usable.
Behavior
- Detects and displays unused whole disks.
- Asks for the target disk, filesystem, and mount point.
- Requires explicit confirmation before destructive changes.
- Creates one GPT partition and formats it as ext4 or XFS.
- Adds the filesystem UUID to /etc/fstab, performs the initial mount, and saves the managed SolidGroundUX storage configuration.
- The initial mount is part of provisioning; the standalone Mount storage action is retained for later administrative remounts and is not a compound child action.
- Honors console dry-run mode.
Inputs
(globals): FLAG_DRYRUN
Outputs
(files): /etc/fstab
Returns
- 0 when storage is provisioned or the action is cancelled.
- Non-zero when validation, partitioning, formatting, or mounting fails.
Usage
storage_provision
