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:
- Use
parted /dev/mmcblk1 resizepart 1 100% to expand the partition
- Run
partprobe to re-read the partition table
- Execute
resize2fs /dev/mmcblk1p1 to expand the filesystem
- 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
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:
E: You don't have enough free space in /var/cache/apt/archives/)Current Manual Process
Users must currently SSH into the device and manually:
parted /dev/mmcblk1 resizepart 1 100%to expand the partitionpartprobeto re-read the partition tableresize2fs /dev/mmcblk1p1to expand the filesystemProposed Solutions
Option 1: Web UI Integration (Preferred)
Add a "Storage Management" section to the BELABOX web interface with:
Option 2: Automatic Detection
Option 3: Documentation + Script
/usr/local/bin/belabox-expand-diskExpected Behavior
Technical Notes
5.10.160-belabox/dev/mmcblk1