brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: find the disk that holds a file with ls on /mnt/disk*

Linux
~/tips/tip-unraid-find-disk-for-file

ls -l /mnt/disk*/Media/film.mkv 2>/dev/null

Shows on which array disk a file from a user share physically sits.

A user share hides which disk a file lives on. Sometimes you need to know anyway.

Every array disk is mounted as /mnt/diskX, and pools are at /mnt/poolname, with cache as the common pool name. The user share at /mnt/user merges them. To see where one file really is, list it on all disks and hide the errors:

ls -l /mnt/disk*/Media/film.mkv 2>/dev/null

Only the disk that holds the file prints a line. In the Shares tab there is also a Compute button per share, and Compute All, which forum users say shows the size of the share and how much of each disk it uses. It can be slow, and reloading the tab helps when it never finishes.

The caveat is the one the docs repeat: never copy or move files directly between a user share and a disk share, because that can corrupt files or lose data. Use these paths to look, not to move.

Further reading: Unraid docs: Shares, On this site: when the array will not stop, find out what still has a disk open, On this site: check an array disk's filesystem in Maintenance mode, and use the md device

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link