A lightweight Go program that displays storage usage across multiple devices — including Android, tablets, and ZyXEL NAS systems — with automatic detection of USB drives connected to ZyXEL NAS (/e-data).
This project preserves the original code structure while extending it with dynamic USB detection on ZyXEL devices running FFP (fonz_fun_plug).
- Displays formatted storage information for:
- Redmi internal and SD card paths
- Android tablet storage
- ZyXEL NAS RAID volumes (
/dev/md0,/dev/md1) - Automatically detected USB drives in
/e-data
- Uses
dfto gather disk stats (works on Linux and embedded NAS systems) - Shows color-coded bar charts with usage percentage
- Designed to run on low-resource environments (ARMv5 ZyXEL NAS)
- ANSI color support for clean, readable terminal output
- A static list of known storage paths is defined (Android + ZyXEL HDDs).
- The function
detectZyXELUSB()lists the/e-datadirectory to find all connected USB devices automatically. - Each found mount is appended to the main storage list.
- For each storage path,
dfis executed to retrieve capacity and usage data. - The information is displayed as a colored usage bar and numerical summary.
- Go 1.19+
- Works on:
- Linux (x86 / ARM / ARMv5 / ARMv7)
- Android (via Termux)
- ZyXEL NAS with FFP (fonz_fun_plug)
Ensure that:
/e-dataexists (for ZyXEL USB devices)dfandlscommands are available in your system PATH
go run main.go
Build binary:
go build -o storage main.go
Run the binary:
./storage
---
📁 Directory Detection Logic (ZyXEL USB)
The ZyXEL USB devices are mounted under /e-data/ with directories named after the device UUID or label.
For example:
/e-data/af5af4bc-aed3-4497-9663-9e2c60bbd5cb
/e-data/68E0-DADB
The program dynamically lists these entries and adds them to the monitored storages list, labeling them as USB: <directory>.
---
🧩 Future Enhancements
Auto-detect USB labels via blkid
Shorten UUID display (e.g., USB: af5af)
Include network mounts (/mnt/nfs, /mnt/smb)
JSON output mode for integration with dashboards
---
🧑💻 Author
Jonáš Nedvědický (PhateValleyman)
Maintained as part of embedded utilities for ARM-based systems.
---