Skip to content

fix: format and mount Denvr data disk - #169

Merged
drewmalin merged 2 commits into
mainfrom
BREV-13806/denvr-disk-mount
Dec 1, 2026
Merged

drewmalin merged 2 commits into
mainfrom
BREV-13806/denvr-disk-mount

Conversation

@jtripathi1

Copy link
Copy Markdown
Contributor

Problem

For Denvr instances available through Shadeform, the console displays the full storage capacity associated with the instance type. However, only the root disk is mounted and accessible within the instance, while the remaining storage is attached as a raw block device without a filesystem or mount point. As a result, users can access only the smaller root volume, while most of the advertised storage remains attached but is not configured for use.

Solution

Extended the Shadeform launch-configuration script to automatically format and mount the additional disk during instance creation.

  • Renamed GenerateFirewallScript to GenerateBootstrapScript, which now accepts the underlying cloud identifier and uses a shouldMountDataDisk check against denvr, ensuring firewall rules apply to all clouds while disk formatting and mounting are limited to Denvr.

  • Implemented disk-mounting logic that selects the largest whole non-root disk with no filesystem, partitions, or blkid signature and a minimum size of 100 GiB, formats it using mkfs.ext4 only when blank, mounts it at /data, and persists the mount through a UUID-based /etc/fstab entry with nofail,x-systemd.device-timeout=5.

  • Added an idempotency guard to ensure the script runs safely on every boot, as Shadeform installs it as a systemd service. The brev_mount_data_disk function returns early when /data is already mounted, ensuring the setup runs only once.

  • Added unit tests verifying that the disk-mounting block is included for Denvr, excluded for other Shadeform-backed providers, and that the mountpoint -q guard is present in the generated script.

@jtripathi1 jtripathi1 self-assigned this Nov 18, 2026
@jtripathi1
jtripathi1 requested a review from a team as a code owner November 18, 2026 22:21
@drewmalin
drewmalin merged commit 2a7ed98 into main Dec 1, 2026
5 checks passed
@drewmalin
drewmalin deleted the BREV-13806/denvr-disk-mount branch December 1, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants