feat(pi): unmount external USB on undervoltage and I/O errors - #2150
Open
LuckyCoders wants to merge 3 commits into
Open
feat(pi): unmount external USB on undervoltage and I/O errors#2150LuckyCoders wants to merge 3 commits into
LuckyCoders wants to merge 3 commits into
Conversation
The Pi external storage mount script silently ran wipefs and mkfs.ext4 when a single USB disk was not recognised as an Umbrel data drive. Require explicit opt-in before formatting and block foreign filesystems. Fixes getumbrel#1956 Co-authored-by: Cursor <cursoragent@cursor.com>
Skip the Pi boot data-disk script unless umbrel-allow-external-format is set. Enable umbreld external storage on Raspberry Pi, install ntfs-3g on arm64, and exclude disks already used as the Umbrel data volume at /mnt/data. Depends on fix/pi-refuse-auto-format-external-usb Co-authored-by: Cursor <cursoragent@cursor.com>
Poll vcgencmd throttled state and kernel under-voltage / I/O error logs while external storage is mounted on Raspberry Pi. Automatically unmount affected drives and notify the user to use powered USB. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When external USB storage is mounted on Raspberry Pi under Files → External, power-related failures (board undervoltage, kernel warnings, storage I/O errors) can corrupt data if writes continue.
This PR adds a background monitor that detects those conditions and safely unmounts external drives, then notifies the user to use a powered USB hub or a drive with its own power supply.
Depends on:
fix/pi-refuse-auto-format-external-usb(format safety)feat/pi-mount-external-storage(Pi external storage in Files)Problem
Raspberry Pi USB ports supply limited current. Large HDDs without external power often cause:
Under-voltage detected!in kernel logsvcgencmd get_throttledundervoltage flagsI/O erroronsdXUmbrel had no Pi-specific handling: drives could stay mounted while the system was unstable.
Changes
New:
external-storage-power-monitor.ts/Externalvcgencmd get_throttled— undervoltage now or since boot (0x1,0x10000)