[Moved to Roadmap] Add ncdu to TrueNAS SCALE

Problem/Justification
The command line tool ncdu (which I believe stands for ncurses disk usage), is an excellent tool for recursively viewing disk usage for a directory. It was part of the TrueNAS CORE distribution but is sadly lacking from SCALE. Please could it be added, as I don’t see anything equivalent in either the web interface or in the other command line tools provided.

Impact
The impact should be nil for everyone that doesn’t know or care about the tool (apart from approx 500kB for ncdu + libncurses). For people that need such a tool, the impact should be very positive. I can see no negatives.

User Story
A user will typically SSH into the TrueNAS SCALE server and run the tool as follows:
ncdu /mnt/pool0/some/nest/of/files
The tool will run and present the disk usage for the tree of directories and files beneath that point. The user can navigate the hierarchy easily with an intuitive interface and choose to launch a shell from any directory and delete files or directories easily.

15 Likes

It’s very necessary! :smile:

Yes indeed ncdu is a valuable utility as far as I am concerned (I came here to ask these feature request).

I would also say that ncdu is a necessity on a linux based storage system. I’ve been playing around with my new TrueNAS box for a little while now, and ncdu is the first and so far only tool that I’m severely missing.

I totally agree! This is a tool that is sorely missed when analyzing a file server, whether it is a home or a business server.

Although I am not a great security expert, given the small number of packages that ncdu uses (only its own utility and ncurses), I believe that it would not be a problem to keep in TrueNAS Scale!

I know that the idea of ​​the project is to keep it as basic as possible to reduce the possibility of breaches, but in this case I believe that the risk, since it is very small, would be worth the gains that it can bring to users.

Including ncdu would be remarkable. But I just found out it is actually already included inside rclone…

  • Open the rclone config: rclone config
  • Create a new remote type n
  • Type a name I chose local
  • Type 28 for local disk storage
  • Save

Finally, type rclone ncdu local:/mnt/pool0/some/nest/of/files

:tada:

5 Likes

“gdu” (GitHub - dundee/gdu: Fast disk usage analyzer with console interface written in Go) would also work as well… It’s a single Go binary.

1 Like

That’s a nice find! Thank you.

I would have liked to try this binary but I kept getting permission denied on execution.

Downloaded linux_amd64 and linux_static_amd64 with the same result.


The steps for rclone worked perfectly to get me out of the bind

Where did you put it? The /home dataset is set noexec, so you’d need to run it from somewhere else. And, of course, make sure it’s executable.

I was /home/admin. That would have been it. Cheers for explaining that

Tried moving it to the paths I found under $PATH and was unable to move due to read-only file system.

Is there a canonical place to place binaries on TrueNAS?

Nope, and with the OS being as locked-down as it is, I’d say the odds of that changing very closely approach zero. Some earlier discussion of the issue:

The upshot is to pick a place on one of your pools and put them there. Add that to $PATH if you like.

2 Likes

Devs, any info on adding this tool to 25.04 and 25.10?

+1 for ncdu

Install ncdu

$ wget https://dev.yorhel.nl/download/ncdu-2.9.1-linux-x86_64.tar.gz
$ tar -zxf tar -zxf ncdu-2.9.1-linux-x86_64.tar.gz
$ ./ncdu

For some folder

$ ./ncdu /mnt/storage-hdd/

1 Like

Sadly this is probably the best solution at this time.

I looked at the rclone implementation from above and it’s not usable afaics.
e.g. no ncdu -o moo.ncdu -c /mnt/...ncdu -f moo.ncdu
:person_facepalming:

I’m glad i still have CORE* running wherver i use that on occasion.

i mean the fact that one needs to download it, sure it’s from the creator but i’m used to runnning “DEBIAN” packages on which a shitload of people take a look if it’s not infected!

Which brings me to the idea.

apt-get download ncdu/sid
dpkg-deb -R ncdu*.deb ./
scp usr/bin/ncdu this.truenas.scale.crap:bin/

:see_no_evil_monkey: :speak_no_evil_monkey: :hear_no_evil_monkey:

EDIT: fwiw, better use bookworm packages for now. Now i even have screen back :clinking_beer_mugs:

Great news! This feature request has been transferred to our internal roadmap for detailed scoping and assessment.

What this means:

  • Our product and technical documentation team will now evaluate technical feasibility, resource requirements

  • This request is now closed for voting, and your votes have been released back to use on other requests

  • Please note that transfer to the roadmap doesn’t guarantee implementation - some features may not proceed based on our assessment findings, however we will update this thread once a decision has been made.

Thank you to everyone who voted and contributed to the discussion. Your input has been invaluable in helping us understand the community’s needs and use cases for this feature.

7 Likes