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.

How do I move my appdata share to a new cache drive?

Featured Replies

Hi,

 

first off: unRAID is fantastic.  I can count of the fingers of one hand the pieces of software that have Just Worked and been Easy to Manage.  Many thanks!

 

My problem: I have added a cache drive to my unRAID 6 NAS and want to move my appdata share from Disk 1, where it currently resides, to the cache drive, where I want the mover to ignore it (the object of the exercise is to prevent Plex Media Server -- running under Docker -- from keeping my drives spinning).

 

Is the process as simple as the following?

(1) stop the array;

(2) unRAID Main > Shares > appdata : select Use cache disk: only and remove Disk 1 from Included disks;

(3) unRAID Main > Docker > Plex Media Server : change the container volume mapping for /config from /mnt/user/appdata/PlexMediaServer to /mnt/cache/appdata/PlexMediaServer;

(4) restart the array.

 

Will unRAID automatically handle the migration for me?

 

Advice would be much appreciated!

 

First off, welcome!

 

It's actually even easier than that... (give or take)  ;)

 

No need to stop the array to change a disk share to cache only, but you will need to move the files yourself.

Also, no need to fix the mapping to the container...

Regardless of which disk the files are on, you can still point it to /mnt/user/appdata and if it's set to cache only, it will only be on your cache directory!

 

So..

(1) unRAID Main > Shares > appdata : select Use cache disk: only and remove any include/exclude, it's not needed.. Cache only is cache only, apply, done.

 

(2) Move files from disk 1 to cache drive (this can be done in multiple ways, however you ABSOLUTELY don't want to copy from a user share to disk share (or whatever way that is)).

 

The easiest way is to just use another computer and copy the appdata folder from disk 1 to the cache drive (if in Windows, use the basic file explorer copy/paste).

 

If you do not currently export the disk shares, click on each disk (1, and cache), set export to yes for either SMB or NFS, now use SMB or NFS from another PC to copy it to cache, and when finished delete the copy from disk 1.

 

----- (If you don't feel comfortable using SSH please do not, it shouldn't be needed)-----

 

I have noticed some issues at times attempting to copy in use or permission locked files, so if that's the case and you know how to use Putty to SSH in, just type this.

 

cp -avr /mnt/disk1/appdata /mnt/cache/appdata

 

Once it's successfully transferred (please verify contents prior to continuing by checking your cache share for the appdata folder)

 

rm -rvf /mnt/disk1/appdata

 

One more thing I'm pretty sure you will have to do is stop and restart the array.  The User Shares file system is only created at array start, so a restart is probably needed to pick up the move (I think!).

  • Author

Many thanks, I will give this a go when I get home this evening.

 

Just to make sure I understand, setting my appdata share to cache only will automatically create the /mnt/cache/appdata directory for me, into which I can copy the data currently in /mnt/disk1/appdata.  Do I need to change the Plex Docker container mapping for /config from /mnt/user/appdata/PlexMediaServer to /mnt/cache/appdata/PlexMediaServer or will the file system interpret the former as an alias for the latter?

 

Thanks again,

Ralph

Many thanks, I will give this a go when I get home this evening.

 

Just to make sure I understand, setting my appdata share to cache only will automatically create the /mnt/cache/appdata directory for me, into which I can copy the data currently in /mnt/disk1/appdata.

 

Not necessarily, but not sure.. If you haven't written anything to the appdata folder since the change, I would guess it would not. As soon as you did though, it would be there. However just create a folder called appdata on the cache drive and you would then have a folder there.

 

That mapping is for a physical mapped drive (mnt/cache/appdata) , as opposed to a user share mapping (/mnt/user/appdata).

So as an example if you added a folder called "media" on disk1, it is there as soon as you make the folder. The path would be /mnt/disk1/media no "share" needs to be created as it is a path.

 

In that example if you wanted it as a user share, you would make "media" as a user share, and then you could point to /mnt/user/media and it would find the files that are in a "media" folder at the root of any drive.

 

Do I need to change the Plex Docker container mapping for /config from /mnt/user/appdata/PlexMediaServer to /mnt/cache/appdata/PlexMediaServer or will the file system interpret the former as an alias for the latter?

 

No, see below.

 

Also, no need to fix the mapping to the container...

Regardless of which disk the files are on, you can still point it to /mnt/user/appdata and if it's set to cache only, it will only be on your cache directory!

One more thing I'm pretty sure you will have to do is stop and restart the array.  The User Shares file system is only created at array start, so a restart is probably needed to pick up the move (I think!).

 

I'm not sure if this is needed anymore, however I am also just guessing.

For instance if I go into the share page and click compute on a share, it will show me all the drives with that share on it. If I delete that folder from a drive, and hit compute again, it is now gone and no longer listed.

...That mapping is for a physical mapped drive (mnt/cache/appdata) , as opposed to a user share mapping (/mnt/user/appdata).

So as an example if you added a folder called "media" on disk1, it is there as soon as you make the folder. The path would be /mnt/disk1/media no "share" needs to be created as it is a path.

 

In that example if you wanted it as a user share, you would make "media" as a user share, and then you could point to /mnt/user/media and it would find the files that are in a "media" folder at the root of any drive.

unRAID automatically makes a user share for any folder at the top level of cache or an array data disk. So, if you create a folder at the top level of a disk, and you have user shares enabled, then you have effectively created a user share whether you actually go to the shares page and add that as a share or not. That user share will have default settings if you don't set them.

unRAID automatically makes a user share for any folder at the top level of cache or an array data disk. So, if you create a folder at the top level of a disk, and you have user shares enabled, then you have effectively created a user share whether you actually go to the shares page and add that as a share or not. That user share will have default settings if you don't set them.

 

That's good to know, thanks (also I think you're following me..  :D )

  • Author

Thanks, everybody, it worked -- that was as painless as could be.  Seems to be a common experience with unRAID.

  • 3 years later...

I was trying to do this recently and think I may have found a different way that is a little more foolproof.

I wanted to move my appdata share from "disk1" to the "cache."

 

What I did was this:

1. Shutdown the Plex Docker.

 

2. Change the "appdata" user share cache setting from "no" to "Prefer."

    (From help docs for Prefer: When the mover is invoked, files and subdirectories are transferred off the array and onto Cache disk/pool.)

 

3. Run the Mover.

 

4. Change the "appdata" user share cache setting from "Prefer" to "Only."

 

That seemed to do what was explained here, and avoided using the command line.

 

 

You could leave the setting at ”Prefer”.   That way if your cache runs out of free space files will start getting written to the array rather than the dockers starting to fail as they run out of room.

  • 4 years later...
On 7/25/2015 at 10:44 PM, bungee91 said:

cp -avr /mnt/disk1/appdata /mnt/cache/appdata

 

Once it's successfully transferred (please verify contents prior to continuing by checking your cache share for the appdata folder)

 

rm -rvf /mnt/disk1/appdata

Thank you @bungee91 for those SSH command lines.  Worked perfectly for me in moving my appdata files onto a new cache disk, freeing up my NVME to dedicate it to my Gaming VM.

18 hours ago, startsomewhere said:

moving my appdata files onto a new cache disk, freeing up my NVME to dedicate it to my Gaming VM.

Be sure to check settings for appdata user share to make its files stay on the correct pool.

 

  • 11 months later...

I know this is an old thread but it still seems relevant.

I recently saw a video where the guy said to reduce iowait time to set the appdata share to cache only and instead of mapping /mnt/user/appdata to use /mnt/cache/appdata instead.

I don't really have an iowait issue, just looking to have fast dockers etc. I have given it a go and it appears as if the files are in both /mnt/user/appdata and /mnt/cache/appdata.

If i create a txt file in /mnt/cache/appdata it is also in /mnt/user/appdata.

The appdata "folder" in /mnt/user is listed as appdata@ and a different color, is this just a sym link?

13 hours ago, SavageAUS said:

if the files are in both /mnt/user/appdata and /mnt/cache/appdata.

If i create a txt file in /mnt/cache/appdata it is also in /mnt/user/appdata.

This is expected as they are two different views of the same data.  The /mnt/user is the view via user shares and spans all devices, and the /mnt./cache is the view via the /mnt/cache device.

  • 1 year later...

For those looking at this in 2025

Setup the appdata share to use Cache as primary, and Array as secondary

Set Mover to move from Array to Cache

Start Mover

Once done, remove the Array as Secondary (or not)

Nothing can move open files, so you must disable Docker in Settings before appdata can be moved.

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

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.