Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Cache Drive + User Shares: Just realized my setup is not ideal

Featured Replies

So I've been using unRaid for about 2 years now and had no issues until January this year when I started running out of space.  My Setup is as follows:

 

Parity:  1.5 TB

Disk 1: 750 GB

Disk 2: 750 GB

Disk 3: 750 GB

Disk 4:  1.5 TB

 

Here's my issue:  When I setup the system, I never configured user shares (they are set to disabled).  For the last 2 years I've been placing all my media on my server by UNC path to \\Server\Disk1 or \\Server\Disk2, etc.

 

I've recently decided to add a cache drive to improve write speeds (and upgrade a few of the 750s, as they are filling up).  The issue is, if I understand it correctly, the cache drive is only utilized if you have user shares - which I don't. 

 

I looked at the crontab and mover job and it seems to backup that idea.  My question is - what's the best way for me to go about fixing this?  I clearly do not have enough space to move everything off the array and back onto it. 

 

In my mind, I was imaging the cache drive working like such:

Place files in \\Server\Cache\Disk1 or \\Server\Cache\Disk2 etc.  Crontab uses mover to move all files from Disk1 directory to Disk1 overnight, Disk2 directory to Disk2 etc.

 

Would this work for my setup?  Is the cache drive mappable by UNC path?  I could probably figure out a sloppy way to script the rest... :(

 

 

Edit:  Not sure that it matters, but I thought for clarity I would state that I did sort my data to a certain extent.  Disk1= ISOs, Disk2 = Media, Disk3 = Games, Disk4 = Backups.  So it's not like I have a mix match of data strung everywhere that would be a nightmare to script.

Just enable the user-shares.  You do not need to move any files.  (user-shares are a VIRTUAL union of the files on the disk shares.  That allow the same top level directory to be on mode than one disk, but you can still manage where the files are stored as you do today by use of the disk shares)

 

You do not need to script anything, nor move any files.  You will need to set the split level on each of the user-shares, and to enable each of them to use the cache drive.  (that is done per-user-share)

 

Set the split level to "0" if YOU want to manually create the top level directories on the physical disks.  Set it to "1" if you want unRAID to create top level directories on the disks itself.  Set it to "2" if you  want it to create the top "2" levels of directories on the disks as needed, etc.

 

Each top-level directory on your disks will automatically become a user-share.  You can then use the cache drive by writing to \\server\Media or \\Server\ISOs or \\Server\Games

 

unRAID will write to the cache drive initially, and then move the contents to the protected disks as scheduled by the mover process.

 

 

You could try placing the files onto the cache disk in the exact same path as you'd want on each array disk. For example, don't use \\server\cache\disk1 but rather use \\server\cache\ISO as the location. This is assuming you have an "ISO" directory on disk1 and that is where you want to place the file.

 

I just don't know what exactly will happen if user shares are not enabled. It might not work at all or you might not have any control over which files go to which disks. So, enabling shares and using the software as it was designed is likely the best solution. Try reading the unofficial manual in the Wiki for help on the shares and what the split level means. You can setup the shares so they don't export on the network (you keep using the individual disks) and they stay on certain drives or stay organized a certain way if you so desire.

 

The only reason you wouldn't want to just enable shares is if you've gone and placed a whole bunch of top level directories on each disk (say a directory for every movie is on disk1). Every directory would become a user share and you likely don't want 100's or 1000's of user shares. In this case, I suggest you first re-organize your data to be stored under top level directories by data type before trying the user shares.

 

  • Author

The only reason you wouldn't want to just enable shares is if you've gone and placed a whole bunch of top level directories on each disk (say a directory for every movie is on disk1). Every directory would become a user share and you likely don't want 100's or 1000's of user shares. In this case, I suggest you first re-organize your data to be stored under top level directories by data type before trying the user shares.

 

I have already discovered this, and you are correct. It wasn't 1000, but it was about 10 or 12.  I have already used Midnight Commander to correct this and now have 4 shares, one root level folder per disk.

 

Joe, if I understand you correctly, I believe you are telling me that the split level can lock down what shares go to what drives.  Let me explain what I'm thinking and you can tell me if I'm off.

 

Setting split level 0 (user created folders) would lock all files and folders intended for \\Server\ISOs to ONLY the disks which contained a Top level directory called ISOs which I create (in my case, just disk1).  This would utilize the cache drive if I write to \\Server\ISOs, and at the predefined time, my data would be written ONLY to \\Server\Disk1\ISOs\ from the cache drive instead of the High Water type where directories are created on Disk1, Disk2, etc and the drive with the most free space is picked first.

 

 

Thank you for asking this. I am trying to understand how split level will work myself, so Joe's post was helpful I have a clarification though.

 

Split Level question  - here is my folder structure:

 

I have 3 shares created:

 

//tower/Movies

//tower/TV Shows

//tower/Backups

 

Now within Movies I have a folder separately for the language of the movie (I have more than one language in my collection):

 

e.g. //tower/Movies/English Movies/Movie 1/movie1.mkv

 

I have my split level set to 3 because I did not want any of the Movie folders (Movie 1) split between discs - now after reading this I'm confused whether that is the right number, or should I set it to 2. Also what happens when the disk a disc is full, does that affect it at all?

  • Author

Excellent.  I have moved 4 GB of data to the share \\Server\ISOs.  Transfer was lightning fast!  Folders were created on the \\Server\Cache drive like I expected they would be.  So far so good.

 

I've tried to kick off the "Move NOW" under the web interface.  Nothing seems to happen.  Is there a way to execute this script from the command line via terminal?

 

I would like to try and manually run mover once to make sure it's going to in fact move and not have to wait until morning to find out.  Since the web UI isn't working, I have a suspicion I have set my split level wrong.

 

Presently I have Split level at 0.

 

So....

physical - no directory

\\Server\Disk1\ISOs\

and  share

\\Server\ISOs\Content\

and cache shows the new folder

\\Server\cache\ISOs\Content\

 

Would the folder not existing in \\ServerDisk1\ISOs\ cause mover to fail with split level 0?

 

 

Excellent.  I have moved 4 GB of data to the share \\Server\ISOs.  Transfer was lightning fast!  Folders were created on the \\Server\Cache drive like I expected they would be.  So far so good.

 

I've tried to kick off the "Move NOW" under the web interface.  Nothing seems to happen.  Is there a way to execute this script from the command line via terminal?

 

I would like to try and manually run mover once to make sure it's going to in fact move and not have to wait until morning to find out.  Since the web UI isn't working, I have a suspicion I have set my split level wrong.

 

Presently I have Split level at 0.

 

So....

physical - no directory

\\Server\Disk1\ISOs\

and  share

\\Server\ISOs\Content\

and cache shows the new folder

\\Server\cache\ISOs\Content\

 

Would the folder not existing in \\ServerDisk1\ISOs\ cause mover to fail with split level 0?

yes. it would fail, as the "Content" directory does not exist.

For now, I'd set split level to something higher.

 

 

  • Author

Got it.  After setting Split level to 1 and attempting to move again, I still saw no indication or activity when running TOP via telnet.

 

I opened another telnet session and ran:

 

lsof | grep mover

 

And found that mover was already running, but hung.  I killed the process using:

 

kill ####

 

Where #### = the process ID of mover.

 

After doing this I ran mover manually.

 

mover

 

I now see everything copying over correctly.  In addition, the TOP command shows rsync running (yay!).

 

Thanks everyone for your help!  Love this product!

Would the folder not existing in \\ServerDisk1\ISOs\ cause mover to fail with split level 0?

 

No, it should not. Split level = 0 means that the file is placed on the drive where the top level directoris already exist. In this case, if ISOs exists only on disk1 then the file must go to disk1.

 

For another example, say you had ISOs on disk1 and ISOs\Content on disk2. Any data written under the ISOs directory, excluding ISOs\Content, could go to either disk since ISO's exists on both disks. If the data is written under ISOs\Content then it must go to disk2 since that structure already only exists on disk2.

 

It's an odd split level but handy to keep things organized. Say you create the share directory on each disk. Then, the first time you write each sub-directory into the share, unRAID will pick a disk using the allocation method. After that, each of those sub-directories is locked to a single disk.

 

 

  • Author

Ok.  What I did was raise the split level to 1 so directories would be created automatically by unRaid, then excluded all but Disk1 from the ISO share under the sharing tab.  My allocation method is Fill-Up.  Things seem to be working fine now. 

Shares.PNG.44f2aaaadca1b194858388767343ddec.PNG

If you just include a single disk, ie disk1, then the split level doesn't matter since the user share is on a single disk and the split level is only for spreading the user share to multiple disks.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.