Skip to content

[Feature Request] Add disk expansion functionality to web UI or provide automated script for SD card resize #3

@simeononsecurity

Description

@simeononsecurity

Problem

When using larger SD cards (e.g., 512GB) with BELABOX, the filesystem only uses a small portion (~3.6GB) of the available space by default. This causes:

  • Software update failures due to insufficient storage space (E: You don't have enough free space in /var/cache/apt/archives/)
  • Inability to store recordings or other data
  • Manual intervention requiring SSH access and command-line expertise

Current Manual Process

Users must currently SSH into the device and manually:

  1. Use parted /dev/mmcblk1 resizepart 1 100% to expand the partition
  2. Run partprobe to re-read the partition table
  3. Execute resize2fs /dev/mmcblk1p1 to expand the filesystem
  4. This requires technical knowledge and is error-prone

Proposed Solutions

Option 1: Web UI Integration (Preferred)

Add a "Storage Management" section to the BELABOX web interface with:

  • Display current disk usage and available expansion
  • One-click "Expand to Full Disk" button
  • Progress indicator during expansion
  • Warning about not powering off during the process

Option 2: Automatic Detection

  • Automatically detect undersized filesystems on boot
  • Present expansion option in web UI with clear explanation
  • Optional: Auto-expand on first boot (with user confirmation)

Option 3: Documentation + Script

  • Provide comprehensive documentation for manual expansion
  • Include a ready-to-use script: /usr/local/bin/belabox-expand-disk
  • Add to FAQ/troubleshooting guides

Expected Behavior

  • Users with large SD cards should be able to utilize full storage capacity
  • No software update failures due to storage constraints
  • Simple, safe process accessible to non-technical users

Technical Notes

  • Tested on custom kernel 5.10.160-belabox
  • Uses GPT partition table on /dev/mmcblk1
  • Single ext4 partition that needs expansion
  • Process works but requires manual intervention

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions