Replace A Cache Drive
This page describes how to replace your Cache drive without losing anything
Replacing or upgrading your Cache drive - for unRAID v6.2 and above
- Note: these procedures assume that there are Docker or VM related files on the Cache disk. If you are absolutely sure there aren't, the Docker or VM steps can be skipped.
- Note: this procedure can be performed with unRAID versions prior to 6.2, but you won't have the Use cache disk: Prefer option. So instead of doing steps 11 and 12, you will have to manually move all files back to the new Cache drive.
- Prepare your new Cache drive first. If it's not an SSD, you may want to Preclear it
- All plugins, Dockers, and VM's that use the Cache disk in any way must be stopped
- In order to avoid interference, we are about to disable a number of things. You may want to make notes of what you change, so you can reverse it afterward.
- Go to Settings -> Scheduler and change the Mover schedule so it won't run for the next few days (once this procedure is done, you'll change it back)
- Stop all VM's, then go to Settings -> VM Manager and set Enable VMs to No, then click Apply
- Stop all Docker containers, then go to Settings -> Docker and set Enable Docker to No, then click Apply
- If it's installed, make sure the Community Applications Appdata Backup plugin is not scheduled to run during this procedure
- Click on Shares and set all shares present on your Cache disk to Use cache disk: Yes. This will cause the Mover to move all shares OFF the Cache drive!
- Check that there is enough free space on the array and invoke the Mover by clicking Move Now on the Main page
- When the Mover finishes, check that your Cache drive is empty. Any files in the root will not be moved as they are not part of any share. You can ignore any empty folders and Recycle Bin folders, and temporary and trash files, but if there is anything else that you want saved, now is the time! Copy it to a safe place, such as on an array drive.
- Stop the array and unassign the old Cache drive
- If the new Cache drive is not yet installed in your server, power down and install the new drive, then power back up. Note: you can save yourself a little time by first setting array auto-start temporarily to No (Disk Settings -> Enable auto start).
- Assign the new Cache drive
- Make sure the file system for the Cache drive is set as you wish (click on the Cache drive and check File system type)
- Start the array, and let unRAID format it
- Change all shares that you want to exist only on your Cache drive to Use cache disk: Prefer. This will cause the Mover to move these shares back to the Cache drive.
- On the Main page, click Move Now
- When the Mover finishes, check that the Cache drive is no longer empty, and has all the right shares on it.
- Now you can change all shares that you want to be ONLY on your Cache drive to Use cache disk: Only.
- Re-enable anything in Settings you disabled before, such as Dockers, VMs, the Mover schedule, and array auto-start
- And finally, you can restart any Docker containers and VMs. You are done!
Replacing or upgrading your Cache drive - for unRAID v6.1 and below
- Written for unRAID v5, not fully updated for v6 but should work OK
- Preclear the new cache drive
- Disable the Mover schedule. Stop all plugins, Dockers, and VM's that run on or use the Cache disk in any way (unsure, but you may also need to temporarily disable Dockers)
- Log into your server as root
- Run Midnight Commander ('mc' <enter>)
- Navigate to your current Cache drive, should be at /mnt/cache
- Select all of your Cache files and folders, using the <Insert> button. (.sickbeard, .sabnzbd, etc...)
- Make a new backup folder on a specific drive on your array, such as /mnt/disk7/cachebackup
- Copy all of the Cache drive files and folders to the folder you just created
- Stop the array
- Go to the Main tab in the web GUI, and use the drop down for the Cache drive, at the bottom, to reassign the cache drive(s)
- Start the array
- The new cache drive will show up as unformatted, so go to the bottom of the Main tab, and format the drive. If you Precleared the drive, this should only take a few seconds
- With the array running, log into your server as root and run Midnight Commander again
- Copy all of the files and folders from your Cache backup (e.g. /mnt/disk7/cachebackup) back to /mnt/cache
- Stop the array (will stop all of your additional programs)
- Start the array. Bob's your uncle
- You may now re-enable the Mover schedule, and restart any plugins, Dockers, or VM's that run on or use the Cache disk
- Note: Midnight Commander is used above, you could instead use rsync at the command line. (e.g. rsync -avXH /mnt/cache /mnt/disk7/cachebackup)