Directory structure


RadOD

Recommended Posts

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?

disk1.PNG

user.PNG

Link to comment

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?

Link to comment
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.

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.