Moved my Docker image and qppdata to an unassigned drive and its now broke...help please!


jazzy192

3 posts in this topic Last Reply

Recommended Posts

Hey chaps. I followed this guide exactly as it said: https://forums.serverbuilds.net/t/guide-move-your-docker-image-and-appdata-to-an-unassigned-drive/1478/19 in the guide it says to do this:

 

  • 0. Back up your appdata folder
    • I would recommend installing the CA Appdata Backup/Restore plugin from the Apps tab, and running a full backup of your entire appdata folder prior to moving anything. The process shouldn’t take more than a few minutes, and it will give you a safety net just in case you run into a problem. You may also want to consider using the plugin to schedule recurring backups. Regardless of how you backup the folder, make sure the backup is completed before you proceed.
  • 1. Stop all of your running containers
    • Save your work in any containers that are running, then go to the Docker tab in the WebUI and click the Stop all button.
  • 2. Disable Docker and grab the current paths
    • Go to Settings > Docker, and set Enable Docker to No, then Apply the settings and wait for the page to reload. You’ll notice the Docker tab is no longer showing in the top menu. While you are here, make note if the Docker vDisk locationand Default appdata storage location. You will need these paths in a future step. Take a screenshot, or copy them to a notepad to make things easier. Copy the full path including the leading and trailing slashes. If you haven’t changed them from the defaults, they are:
      Docker vDisk location: /mnt/user/system/docker/docker.img
      Default appdata storage location: /mnt/u1

  • 3. Get the unassigned drive name

    • Go to the Main tab and find the name of the unassigned drive you want to use. For example, in this screenshot I have a disk named ua_docker. This drive name is what you will use in all the steps below when they ask for <unassigned_drive>

<<<<SEE ATTACHED PHOTO CALLED: Get File Namepng.>>>

  • 4. Open a terminal
    • Click the >_ icon in the upper right to open the Web Terminal, or use Putty or your favorite terminal emulator to connect to the server.
  • 5. Create the folder for the Docker vDisk
    • Enter the following command:
mkdir -p /mnt/disks/<unassigned_disk>/system/docker && chown -R nobody.users /mnt/disks/<unassigned_disk>/system
  • replacing <unassigned_disk> with the name of the disk from step 3.
  • 6. Move the Docker vDisk image to the new drive

    • Enter the following command:

    • mv <default_appdata> /mnt/disks/<unassigned_disk>/

      replacing <default_appdata> with the appdata location from step 2, and <unassigned_disk> with the disk name from step 3. This step may take a while, depending on how many containers you have.

  • 7. Move the appdata folder to the new drive

    • Enter the following command:

    • mv <default_appdata> /mnt/disks/<unassigned_disk>/

      replacing <default_appdata> with the appdata location from step 2, and <unassigned_disk> with the disk name from step 3. This step may take a while, depending on how many containers you have.

  • 8. Mount the Docker vDisk image

    • Enter the following command:

    • mkdir /mnt/docker_temp && mount /mnt/disks/<unassigned_disk>/system/docker/docker.img /mnt/docker_temp

      replacing <unassigned_disk> with the folder from step 3.

  • 9. Update the container configuration files to reflect the new appdata path

    • Enter the following command:

    • find /mnt/docker_temp/containers -name '*.json' -exec sed -i -r 's/appdata(.*):(r[ow])"/appdata\1:\2,slave"/g; s+<default_appdata>+/mnt/disks/<unassigned_disk>/appdata/+g' {} \;

      Replace <default_appdata> with the appdata folder from step 2, and <unassigned_disk> with the disk name from step 3.

  • 10. Update the dockerMan templates to reflect the new folder

    • qnter the following command:

      find /boot/config/plugins/dockerMan/templates-user/*.xml -exec sed -i -r 's+<default_appdata>+/mnt/disks/<unassigned_disk>/appdata/+g; s/(.*)appdata(.*)Mode="(r[ow])"(.*)/\1appdata\2Mode="\3,slave"\4/g;' {} \;

      Replace <default_appdata> with the appdata folder from step 2, and <unassigned_disk> with the disk name from the beginning.

  • 11. Update Unraid Docker Config

    • Enter the following command:

    • sed -i 's+/mnt/user/+/mnt/disks/<unassigned_drive>/+g' /boot/config/docker.cfg

      Replacing <unassigned_drive> with the disk name from step 3.

  •  12. Clean up after yourself

    • §Enter the following command:

    • umount /mnt/docker_temp && rmdir /mnt/docker_temp && exit

      You can now close the terminal window.

  • 13. Restart the Docker engine

    • Go to the Docker tab and verify that all of your containers are still listed. You can now start your containers again and verify they’re working.

  • 16. It's Miller Time

    • That’s it, you’re done. If your containers are all running, grab a beer or 3 and celebrate. You have successfully moved your Docker installation.

 

 

But now when I startup Unraid I have to disable Docker before starting the array and then when its started I can turn on Docker but quite a few of them don’t work and the docker screen looks like the one attached.

 

I just installed radarr-sma for example but the install filed and when I click launch it says "Execution Error" and below 'Server Error'?

Get Drive Name.png

IMG_0002.png

Link to post

Without going through the massively complicated directions, since you're using 6.9, instead of utilizing an unassigned device for things, you're better off (and it's going to just plain work better) if you had instead created a new cache pool.

 

But, for the execution error, edit the container, make a change any change, revert it then hit apply.  The exact reason why it's failing will appear following the docker run command that appears.

Link to post
3 hours ago, Squid said:

Without going through the massively complicated directions, since you're using 6.9, instead of utilizing an unassigned device for things, you're better off (and it's going to just plain work better) if you had instead created a new cache pool.

 

But, for the execution error, edit the container, make a change any change, revert it then hit apply.  The exact reason why it's failing will appear following the docker run command that appears.

Cheese Squid but how come all my Docker Containers now show version: not available?

 

I also had to uninstall Radarr as it stopped working that's why I did a demo try with that Radarr-sma.

Link to post

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.