How do I move my appdata to a non-array drive mounted with "Unassigned Devices"?


Recommended Posts

I'm using unRAID version 6.2.4.

 

I've mounted a new 120 GB drive (okay, it's old, actually) as /mnt/disks/Applications using the "Unassigned Devices" plugin.  I've turned on sharing of the drive and adjusted its share permissions in its Settings.

 

I now want to use that disk as my "appdata" share so I don't lose data on a reboot.  This is not a cache disk. 

 

How do I do this?

 

(BTW: I've seen lots of examples of how to use a cache disk for this but I don't have a cache disk.  Mine is simply an Unassigned Devices disk.)

 

Thanks so much!

 

Link to comment

The drive I'm using is really too small to be a cache drive, I think.  That, and it's only 5400 rpm, I think as well.

 

I want the app drive strictly to hold settings for my apps, e.g. my MineOS installed Minecraft server, so that it doesn't lose settings between boots.

 

I didn't want to use a 120gb cache drive as it isn't enough for my daily transfer right now while I'm getting everything setup (multiple Mac Time Machines, some other backups, media files, etc.) which are pushing well past 120gb per day, double or so, really.  Wouldn't I want a large SSD for cache?

 

I've read comments in lots of threads about using Unassigned Devices to mount a separate drive from the array to use as appdata, but none that I can find telling me how to do it. 

 

Is this not a good way to use this little spare drive?

Link to comment

The cache drive is the defacto application drive under unRAID 6.  Placing Dockers on an unassigned drive is *also* supported but most documentation for people starting out references having appdata in its default location of the cache drive.  I'd recommend using the 120GB drive as your cache drive and locating appdata on it for now unless you have near term plans to get more complicated and start using unAssigned Devices.

 

By the way, there's no requirement to cache writes to the array on your cache drive.  You can configure that for each user share.  Personally I don't cache any writes at all, my cache drive is strictly an application drive.  Note that the Use Cache Disk setting under the settings for the share should be set as "no" if you don't want to cache writes, and "only" or "prefer" for shares like appdata that you want to live strictly on the cache drive.  A good reference is the Automatic System Shares section in this post, just scroll down a little.

Link to comment

Now, if I enable a cache drive, do I have to go and change the locations for appdata and Docker storage img in Docker settings or will it switch automatically?

 

If so, which one(s) do I change?  What do I change them to?

 

Thanks.

If you have them setup as in the "Automatic System Shares" linked in tdallen's post it should be automatic.

 

If you don't have them setup that way then we would need to know exactly how you do have them setup before we can tell you what to do.

 

Also, as for caching user share writes, user shares are set to not use cache by default (except as already noted with the system shares) so unless you have set a user share to use cache it will not.

Link to comment

Great!

 

I'm early enough in my setup that I actually don't mind completely rebuilding my array / cache, etc.  And it turns out, that I have a 500 GB drive I could use as a real cache if I decide to.

 

With answers to various posts and defaults set to not cache shares automatically, I'm getting the impression that most people don't use the cache as cache at all.  Is this true?

Link to comment

With answers to various posts and defaults set to not cache shares automatically, I'm getting the impression that most people don't use the cache as cache at all.  Is this true?

Partially. The cache drive started a long time ago in unraid terms as exactly that, JUST a cache drive to compensate for slow parity protected writes. Hardware and software has evolved greatly since then, and many people find array writes across the network plenty fast without caching, especially with turbo write now available.

 

However... there is still a need for the extra performance boost of a non-parity protected drive for mainly internal unraid use, such as docker appdata and VM's.

 

TL;DR

Caching for externally generated writes isn't really needed anymore, but data generated and manipulated inside the unraid box can still benefit from the extra speed.

Link to comment

With answers to various posts and defaults set to not cache shares automatically, I'm getting the impression that most people don't use the cache as cache at all.  Is this true?

I haven't done any polls, but I suspect most people use cache in multiple ways.

 

I have a cache-only share for pictures that get used as wallpaper and screensavers on other computers. I keep them on cache so none of my array drives have to spin up to access them since they may be frequently accessed.

 

I have a cache-only share for DVR recording since I don't usually keep any of that long-term so no need to store it on my array. The SSD cache allows it to be saved more quickly and doesn't spin up my parity drive for writing.

 

I have a cache-only (could be cache-prefer now) appdata share that keeps all my docker applications "working storage".

 

I have a cache-yes share for downloads so they get written to cache as they are download but are later copied to the array when mover runs.

 

All of my other shares are cache-no.

 

How much cache you need depends on how you use it. :)

Link to comment

Hmmmm.

 

  • So I actually just added an SSD as my cache and completely reinstalled unRAID from square one.  (Right down to re-formatting the boot device and re-downloading the key file.)
  • I have caching turned on in Global Share settings.
  • I see appdata, domains, and system folders on the cache drive.

 

However, the Docker setup shows appdata at /mnt/user/appdata and the Docker storage location as /mnt/user/system/docker/docker.img

 

Is there a guide somewhere to switching over to using the cache locations for appdata, Docker images, and VM images?  I can't seem to find the resource I was looking at before.

 

Thanks!

cache.png.6b5bb79f966f8a82c7829bdf7ad258dd.png

cachedirectory.png.9d17bd34782ef225d0828b98ea17abeb.png

globalshare.png.3516f006efc2ea90f58dc72642cc562f.png

docker.png.10aff2e6871629f02ec986316677f953.png

Link to comment

If you re-installed unRAID it was going to do exactly what you wanted by default - there shouldn't have been a need to change anything.  Since you did... based on your prior posts you didn't want to change the global cache setting for shares.  That will cause every share you create to use the cache drive for write-caching.  Unless you want that, turn it back off.

 

Take a look at the settings for each individual share by clicking on it in the main window.  That's were you can set a specific share to Use Cache "yes" or "prefer".  You should see that "prefer" was selected for appdata and system by default.  If not, then change it.

 

You don't need to change any references from /mnt/user/appdata to /mnt/cache/appdata.  They are for all intents and purposes the same thing, with the exception that the /mnt/user reference is going through FUSE and therefore has the intelligence to make use of the cache drive when appropriate.

Link to comment

Alright, so I reset "Use cache disk" to "no" in Global shares settings.

 

I just checked the system shares and you're right...they're either set to Prefer or Yes for use cache disk (only isos is set to Yes).

 

I then exported each of these shares and did a test.  Once exported, I wrote to each one using my primary non-root user account from my Mac.  I created a separate folder under each one.

 

When I ssh'd over using my root account, and look at /mnt/user/appdata for example, I can see the folder I just built there.

 

When I look at /mnt/cache/appdata, it's not there.  They don't seem to be connected.  Writing to /mnt/user/appdata doesn't seem to affect /mnt/cache/appata.  And, there is no /mnt/cache/isos directory, either.

 

Am I missing something?

 

Thanks again.

 

 

Link to comment

My install is older, so rather than give you steps I'll give you settings since the steps have changed.

 

My Global Share Settings Use Cache is set to Yes (and maybe I was wrong, and you should change that).

My setting for each user share is Use Cache Disk "No", except for the ones I want to use cache.

My setting for each user share that should use the cache disk is "yes" or "prefer".

 

A restart of the array is needed if you change the Global Share Settings.

 

 

Link to comment

My install is older, so rather than give you steps I'll give you settings since the steps have changed.

 

My Global Share Settings Use Cache is set to Yes (and maybe I was wrong, and you should change that).

My setting for each user share is Use Cache Disk "No", except for the ones I want to use cache.

My setting for each user share that should use the cache disk is "yes" or "prefer".

 

A restart of the array is needed if you change the Global Share Settings.

If you turn on Help, you will see this for Global Share Settings - Cache Settings - Use cache disk:

If set to 'Yes' then User Shares can possibly make use of the Cache Disk. You still need to enable use of the Cache Disk on individual user shares.
So that would imply that setting it to No means no user shares can use cache. As far as I know it has always worked this way.
Link to comment
  • 1 year later...

I initially thought I had no need to use a Cache disk for my files, so I opted to set up a M.2 drive in unassigned devices to store my files, Dockers and VMs. I would now also like to move over my appdata and ISOs folder to my unassigned devices drive. After reading this thread, it seems like the best solution would be to just move my unassigned devices drive into cache and only turn on cache for the folders I want to run on my M.2 drive.

 

Is this the best method to get Dockers, VMs, appdata, ISOs and personal files on one drive?

Link to comment
  • 8 months later...

To answer the original question: Under Settings -> Docker -> Advanced View you can change the folder where it stores appdata and the docker img.  don't forget to move the files before restarting docker. FYI: You can also move the libvirt folder too. (Settings - VM Manager - Advanced View)

  • Like 1
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.