RadOD Posted February 12, 2020 Share Posted February 12, 2020 So far I have been treating subfolders of subfolders of /mnt as interchangeable. But from the terminal, if I go to what I thought was the same directory mapped differently, one folder contains a lot more. Can someone explain how/why the directories are set up this way? Quote Link to comment
JonathanM Posted February 13, 2020 Share Posted February 13, 2020 https://wiki.unraid.net/UnRAID_Manual_6#User_Shares Your first shot is only /mnt/disk1, the second is /mnt/user, which shows all the disks. Same files, different view. Don't copy or move files between the two different folder structures without understanding exactly what is going on behind the scenes. You WILL erase your data if you do it wrong. Quote Link to comment
RadOD Posted February 14, 2020 Author Share Posted February 14, 2020 Thanks, that is quite helpful. But just to confirm before I accidentally erase any data... My goal is to create a command in User Scripts to auto move, rename and sort photos from /Incoming into /Sorted. exiftool '-filename<$EXIF:DateTimeOriginal' -d '/mnt/user/Photos/%Y-%m/%Y-%m-%d-%H%M%S%%-c.%%e' -r /mnt/user/Incoming Both folders are user shares. /Incoming is public and /Photos is secure. The windows user has r/w access to /Photos and I am assuming User Scripts is running scripts as root which should have access to all shares. What is the proper way to reference the shares Photos and Incoming? Also, for the most part I am using the files from as the windows user via SMB. I would assume SMB shares by design prevent users from accidentally screwing anything up. However sometimes windows wants to download then re-upload files (I think when they are different shares), I am doing a lot of the initial sorting via a Krusader docker. That is running as root, so when you are using the gui, you are root. If I am moving files from place to place between the two shares, I would assume the proper path to the share is the same as above, correct? Finally - and I assume this is the same answer here too - I am using a dupeguru docker to go through the /Photos share to find duplicates and move them out to a separate /Duplicated share. Same path? Quote Link to comment
JonathanM Posted February 15, 2020 Share Posted February 15, 2020 48 minutes ago, RadOD said: I would assume SMB shares by design prevent users from accidentally screwing anything up. As long as you don't enable disk shares, you are ok with SMB. When working with /mnt paths, as long as you stay totally within /mnt/user you are totally fine. Don't mess with /mnt/diskX or /mnt/cache until you understand exactly why I'm telling you not to. When you understand what's happening behind the scenes, it's easy to avoid corrupting data, but until you have a good grasp, it's safer just to stick with /mnt/user. As you've figured out correctly, user shares are simply the contents of /mnt/user. Keep in mind that windows can't handle folders with case differences, but the command line can. So writing files to /mnt/user/Photos and /mnt/user/photos is going to cause confusion in windows, but your scripts on Unraid won't care, it's two different folders to Unraid. Be careful to stay case consistent. Docker containers add a wrinkle, the paths inside the container are mapped to paths on the host. So, if you have dupeguru mapped with host - /mnt/user container - /UNRAID for example, you would find all your user share folders in the /UNRAID folder inside dupeguru. All this and more is covered in the FAQ's pinned around the forum. 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.