Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] Disk usage (duc)

Featured Replies

Disk Usage (duc)

Fast disk usage analysis for Unraid, powered by duc - https://duc.zevv.nl

Most disk usage tools (du, ncdu) scan the whole file system every time you look, which can take a long time on a big array. duc works differently: it scans once, saves the results to an index database, and then answers every query from that index straight away. This plugin runs the indexing on a schedule, so when you want to know where your space went, the answer is already there.

image.png

Features

- Scheduled indexing: hourly, daily, weekly, monthly or a custom cron expression. It runs at low CPU and I/O priority by default.

- Index now button: shows live progress and can be cancelled.

- Browse in the webGUI: under Settings → User Utilities → Disk Usage:

- sunburst chart: click a ring to zoom in, click the centre to go back up

- sorted folder listing with size, percentage and file count

- switch between size on disk, apparent size and file count

- Several roots in one index: for example /mnt/user for usage per share, plus /mnt/disk1 or /mnt/cache for usage per disk or pool.

- No gaps while re-indexing: the previous index stays browsable while a new one is built, and is only replaced once the new one is complete.

- Options: exclude patterns, stay on one file system, count hard links once (handy if you use hard links with the *arr apps), and Unraid notifications for errors or completed runs.

- The full duc command line in the terminal, including the duc ui text-mode browser:

duc ui -d /mnt/user/appdata/duc/duc.db /mnt/user

Install

Search for Disk Usage (duc) in the Apps tab.

Or install it manually from Plugins → Install Plugin with this URL:

https://raw.githubusercontent.com/jamesfreeman959/unraid-duc/main/plugin/duc.plg

After installing, go to Settings → User Utilities → Disk Usage. Check the paths on the Settings tab, then click Index now for your first index, or wait for the schedule.

Requirements: Unraid 6.12 or later (x86_64). Tested on 7.3.0.

## Good to know

- Spin-ups: an index run reads directory metadata on every disk it covers, so spun-down disks will spin up. Schedule it for a time when that doesn't bother you.

- Speed: indexing /mnt/disk* and /mnt/cache directly is faster than going through /mnt/user.

- Database location: by default /mnt/user/appdata/duc/duc.db. Please don't put it on the USB flash drive, because it's rewritten on every run. If the database folder isn't available (for example when the array is stopped), the run is skipped and nothing is written to RAM.

- Paths with commas aren't supported in the settings.

- Uninstalling removes the plugin and its settings but leaves the index database in place. Delete /mnt/user/appdata/duc yourself if you don't need it.

Getting help

Please post in this thread, or open an issue on GitHub:

https://github.com/jamesfreeman959/unraid-duc/issues

It helps if you include:

- your Unraid version

- what you see on the Disk Usage page (any error message shown at the top)

- the output of these two commands from the terminal:

cat /var/log/duc-index.log

cat /var/run/duc/status.json

Credits and source

- duc is written by Ico Doornekamp and contributors and licensed under LGPL-3.0: https://github.com/zevv/duc

- This plugin is open source (MIT): https://github.com/jamesfreeman959/unraid-duc

The plugin includes duc 1.4.6 built as a single static binary, with one small patch that fixes JSON output for file names containing quotes or backslashes. The patch is in the repo for anyone who wants to check it.

Feedback and feature requests are very welcome!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.