Skip to content

USB Storage

mathisono edited this page Jun 11, 2026 · 3 revisions

USB Storage

Crow can use an external USB drive for persistent message, image, and Winlink form storage. This is useful on AREDN nodes with limited internal flash, or when you want messages and images to survive firmware upgrades.

Note: Not all AREDN nodes have a USB port. Crow detects this automatically and will report "no port on this device" if USB is unavailable.


Prerequisites

Before using USB storage commands, the node needs USB kernel modules installed. Crow ships a setup script that handles this:

ssh -p 2222 root@<node-ip>
sh /usr/local/raven/platforms/aredn/usb-setup.sh

Setup options

Command Description
sh usb-setup.sh Install USB packages only
sh usb-setup.sh format Install packages + format first USB drive as ext4
sh usb-setup.sh format sda1 Install packages + format /dev/sda1 as ext4

The setup script:

  1. Installs USB storage kernel modules (kmod-usb-storage, kmod-fs-ext4, etc.)
  2. Installs DWC3 controller drivers if needed (IPQ40xx / Qualcomm SoCs)
  3. Detects attached USB drives
  4. Optionally formats a drive with the CROWDATA label

The script is safe to re-run — already-installed packages are skipped.


Slash Commands

All USB storage management is done through /storage commands in the Crow message composer.

/storage status

Show the current storage state including mode, root path, image directory, and USB availability.

Example output:

Crow storage: usb
Mode: usb
Root: /mnt/crow
Images: /mnt/crow/images
Mountpoint: /mnt/crow

If USB was configured but the drive is missing, status will show degraded with a reason explaining why, and note that the service is running from internal node storage.

/storage usb scan

Scan for removable USB storage devices attached to the node. Lists each candidate with its device path, model name, size, and whether it is currently mounted.

Example output:

USB storage candidates:

/dev/sda1 USB Flash Drive 14.4 GB [mounted]

/storage usb enable

Mount and activate USB storage. Crow will:

  1. Scan for removable USB drives
  2. Mount the first candidate at /mnt/crow
  3. Create the required directory structure (data/, images/, winlink/forms/)
  4. Migrate existing messages and images from internal storage to USB
  5. Report success or a reason for failure

If a drive is already mounted, Crow activates it immediately.

/storage usb disable

Return to internal node storage. The USB drive remains mounted but Crow stops using it for new data. Existing data on the USB drive is not deleted.

/storage quota images <mb>

Set the image storage quota in megabytes (1–65536 MB). When the total size of stored images exceeds the quota, the oldest images are pruned automatically.

Example:

/storage quota images 128

Storage Modes

Mode Description
internal Messages stored on the node's internal flash (/usr/local/crow)
usb Messages and images stored on the USB drive (/mnt/crow)
degraded USB was configured but is unavailable; falls back to internal storage

Configuration

USB storage can also be pre-configured in crow.conf.override:

{
  "storage": {
    "mode": "usb",
    "mountpoint": "/mnt/crow",
    "label": "CROWDATA",
    "device": "/dev/sda1",
    "image_quota_mb": 64,
    "min_free_mb": 16
  }
}
Field Default Description
mode internal internal or usb
mountpoint /mnt/crow Where the USB drive is mounted
label CROWDATA Filesystem label used when formatting
device auto-detect Force a specific block device
image_quota_mb 64 Maximum MB for image storage
min_free_mb 16 Minimum free space required on the drive

Data Migration

When USB storage is first enabled, Crow automatically copies existing data from internal storage to the USB drive:

  • Message data (/usr/local/crow/data//mnt/crow/data/)
  • Images (/tmp/apps/crow/images//mnt/crow/images/)
  • Winlink forms (/usr/local/crow/winlink/forms//mnt/crow/winlink/forms/)

Only missing files are copied — existing files on the USB drive are not overwritten.

Crow Wiki

Pages

Markdown files

  • APRS.md
  • Backend-Selection-and-Deployment.md
  • Change-Log.md
  • Command-Reference.md
  • Configuration.md
  • Configuring-Channels.md
  • Home.md
  • LoRa-Gateway-Tags.md
  • Meshtastic-API.md
  • Memory-Use.md
  • Strict-Gatekeeper.md
  • USB-Storage.md
  • Winlink.md
  • _Sidebar.md

Maintenance

  • Keep every .md wiki page linked here.
  • Keep Home.md and _Sidebar.md in sync.
  • When a wiki page is removed, remove it from both the Home page inventory and this sidebar.

Clone this wiki locally