From dd54c416469bc3b5872f4fa916534857e9c5654a Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Sun, 22 Feb 2026 18:37:49 +0800 Subject: [PATCH] Fix storage display: deduplicate volumes by device --- dashboard/backend/routers/system.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/backend/routers/system.py b/dashboard/backend/routers/system.py index fa566ce..ee7d947 100644 --- a/dashboard/backend/routers/system.py +++ b/dashboard/backend/routers/system.py @@ -29,8 +29,10 @@ async def send_notification(body: dict): def system_stats(): disk = shutil.disk_usage("/volume1") volumes = [] + seen_devices = set() for mount in psutil.disk_partitions(): - if mount.mountpoint.startswith(("/volume",)): + if mount.mountpoint.startswith(("/volume",)) and mount.device not in seen_devices: + seen_devices.add(mount.device) try: u = shutil.disk_usage(mount.mountpoint) volumes.append({"mount": mount.mountpoint, "total": u.total, "used": u.used, "free": u.free, "percent": round(u.used / u.total * 100, 1)})