bobbintb Posted September 23, 2016 Share Posted September 23, 2016 Occasionally, I need to know the actual disk a file is located on the share. This can be a pain having to check the location for every disk. So I wrote a script and thought I'd share it. Change the extension to sh and put it somewhere on your UnRAID system. I keep mine on the boot drive. I recommend adding an alias to run this script. For example: alias -p whichdisk=/boot/whichdisk.sh Typing the above command in the shell will let you run the "whichdisk" command from any location. Usage: whichdisk /mnt/user/myshare/myfile.txt Returns: It exists at /mnt/disk3/myshare/myfile.txt EDIT: Just a note about this. It searches disks 1-30, since UnRAID can have at most 30 drives in the array. There isn't really a way to enumerate the number of drives to future proof this script, or at least I haven't found one. So, should UnRAID change the maximum number of disks in the array, then this script would need a small update. It should be simple enough for the user to do this themselves; just open the script and change "30" to whatever the new maximum would be. whichdisk.txt Quote Link to comment
itimpi Posted September 23, 2016 Share Posted September 23, 2016 If you browse via the Shares tab, then unRAID will show exactly which disk(s) any folder/file resides on. Quote Link to comment
bobbintb Posted September 23, 2016 Author Share Posted September 23, 2016 If you browse via the Shares tab, then unRAID will show exactly which disk(s) any folder/file resides on. Ah, thanks, good to know. Wish I had known that earlier. Still, it's a good option if you find yourself in the CL. Quote Link to comment
Recommended Posts
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.