Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container Manager - failed to move @docker #38

Closed
lee-booy opened this issue Mar 22, 2024 · 7 comments
Closed

Container Manager - failed to move @docker #38

lee-booy opened this issue Mar 22, 2024 · 7 comments

Comments

@lee-booy
Copy link

Thanks for all the awesome scripts. I successfully moved VM Manager and then tried Container Manager but it failed

Moving /volume1/@appconf/ContainerManager to /volume2
Moving /volume1/@appdata/ContainerManager to /volume2
Moving /volume1/@apphome/ContainerManager to /volume2
Moving /volume1/@appshare/ContainerManager to /volume2
Moving /volume1/@appstore/ContainerManager to /volume2
Moving /volume1/@apptemp/ContainerManager to /volume2
WARNING Moving @docker could take a long time
mv: cannot remove '/volume1/@docker': Device or resource busy
Line 430: ERROR Moving /volume1/@docker to /volume2 failed!

I did do a backup but when I attempt to restore it wants to restore to /volume2, I might attempt that but the backup took 6 hours so it might take a while :) I've also got a snapshot and C2 backup so recovery isn't a problem :)

Of interest

NAS: DS1520+
DSM: DSM 7.2.1-69057 Update 4

156 /volume1/@docker
124823472 /volume2/@docker

@007revad
Copy link
Owner

Which version of the script did you use?

So it took 6 hours and then failed :(

Did the backup succeed without an error?

The script restores a backup to whichever volume Container Manager is currently installed on.

Did you answer yes to backup the @docker folder when the script asked if you wanted to back it up? If you did there should be a copy of the original /volume1/@docker folder in /volume1/@docker_backup.

156 /volume1/@docker
124823472 /volume2/@docker

Is the 156 and 124823472 the sizes of the @docker folders?

If yes, what is the size of /volume1/@docker?

BTW each time you typed @docker without enclosing it in backslashes you pinged the devs at https://github.com/docker 😄

@lee-booy
Copy link
Author

Backup worked fine, the backup took 6 hours (I ran it as a backup rather than as part of the move). The move took about an hour or so, from what I can tell I think it pretty much moved everything except for something at the end and then failed.

I was wondering if it could be because I had snapshot enabled on the /docker share 🤷

Yes those are the sizes of the @docker directories and v3.041

Also I'm not sure what is going on but something funky with my @docker, I only have 10 or so containers. I had a look at the backup and there is 120gig in containermanager/extras/@docker/btrfs 👀

I've already successfully restored (I just replayed Container Manger to volume2, and rebuild the dockers from yaml, only took 5mins) but the volume1/@docker is still there and if I try to remove it I get the same '/volume1/https://github.com/docker': Device or resource busy error. I haven't looked into that yet but happy to in the event it helps someone else.

@007revad
Copy link
Owner

Does the following command return volume1 or volume2

readlink /var/packages/ContainerManager/var/docker

I've had the "Device or resource busy error" when moving @docker. I thought I'd fixed it with killall containerd-shim. I might have to change the script to copy the contents of @docker to @docker on the new volume instead of moving @docker.

@lee-booy
Copy link
Author

readlink points to volume2

A restart of the NAS allowed me to finally remove volume1/@docker, so I'm not entirely sure what was holding onto it. If you wanted to account for this error, maybe if the script sees the busy output, it can recommend a restart and then running the script again?

@007revad
Copy link
Owner

007revad commented Mar 26, 2024

If you wanted to account for this error, maybe if the script sees the busy output, it can recommend a restart and then running the script again?

Good idea. And thank you for the donation.

I think I'll go back to copying @docker to the target volume, instead of moving it, and if there were no errors then try to delete the original @docker.

Ideally I'd like to find what is causing the "Device or resource busy error" and stop it before processing the @docker folder.

@lee-booy
Copy link
Author

Thanks for all the scripts :)

@007revad 007revad mentioned this issue Jun 13, 2024
@007revad
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants