Skip to content
New issue

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

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

Already on GitHub? # to your account

Moving Container manager #178

Open
leotzian opened this issue Feb 3, 2025 · 15 comments
Open

Moving Container manager #178

leotzian opened this issue Feb 3, 2025 · 15 comments

Comments

@leotzian
Copy link

leotzian commented Feb 3, 2025

Hi and sorry for posting here it is not related to your script.
I have a 1821+ with 2 M2 ssd and I tried to move container manager from volume 1 to volume 2 ( M2 SSD ).
Your script worked fine it made a docker backup first and the container manager was moved to volume 2.
Now I stopped container manager as your instructions and I tried to move docker shared folder from volume 1 to volume 2, BUT DSM don't let me to do so.
" This action cannot be performed due to the following reasons. Container Manager requires this shared folder.
Before moving this shared folder unistall the package first"
Why? Doing so I think all my conatiner data will be deleted am I correct? and I have 20 Containers.
Is there another solution or am I doing something wrong?
I run DSM 7.2.2 version
Thanks in advance.

@007revad
Copy link
Owner

007revad commented Feb 3, 2025

You can safely uninstall and then reinstall Container Manager as long as you re-install it on volume 2 and you don't tick the delete option when uninstalling it.

Image

@leotzian
Copy link
Author

leotzian commented Feb 3, 2025

Hi my friend thanks for the answer
So with your script container manager is moved in volume 2, So you say
I unistall it move the shared folder then in volume 2 and then install Container Manager again in volume 2
ALL MY container setting remain?
Am Iunderstood correctly?

@leotzian
Copy link
Author

leotzian commented Feb 3, 2025

So I had moved a bit.
I unistalled Container manager and I DIDNOT tick the delete square, I unistalled container Manager
Then I had moved The docket shared folder from volume 1 to volume 2
Then I had installed Container manager 24.0.2.1525, all of my conatiners that had volume settings had problems because they look in volume 1 and I had to correct the path to volume 2 , the easiest way is by using Portainer, but I cannot make it run I had the error
Container manager API had failed and in the logs there is
"Error,2025/02/03 19:11:23,Leonidas227981,Start container portainer failed: {"message":"failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/portainer": stat /portainer: no such file or directory: unknown"}.

Do you have any idea how to solve this?
Thanks for all

@007revad
Copy link
Owner

007revad commented Feb 3, 2025

I've never been able to install Portainer from the Container Manager ui. It installs but won't start.

So I have a disabled User-defined Script Scheduled Task, set to run as root, to install Portainer and just run when I need to:

docker pull portainer/portainer-ce:latest
wait
docker run -d --name=portainer \
-p 19943:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /volume1/docker/portainer-ce:/data \
--restart=always \
portainer/portainer-ce

@leotzian
Copy link
Author

leotzian commented Feb 4, 2025

I don't know what is going on, I moved the docker container in Volume 1 again all my containers are working except portainet , I always installed portainer using task sceduller in the past, But the error I get is the same, whatever I try to install

Task Scheduler has completed a scheduled task.

Task: Portainer
Start time: Tue, 04 Feb 2025 07:36:18 +0200
Stop time: Tue, 04 Feb 2025 07:36:21 +0200
Current status: 127 (Interrupted)
Standard output/error:
latest: Pulling from portainer/portainer-ce
Digest: sha256:bd8f7a6d98e2a512e18272c38914abd1e92d663451f3c925d502a8557a3b92d7
Status: Image is up to date for portainer/portainer-ce:latest
docker.io/portainer/portainer-ce:latest
1fd7ea821fddd4b3e9abbfd6a551e0fdea123d09916494b472b465a05cc552e1
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/portainer": stat /portainer: no such file or directory: unknown.

Look at the last 2 lines what is shim task and OCI
Whatever I try to do change the volume for 1 to 2 or install everything or modify I get this error, I have no idea what this means.

Thnaks again for you help

@007revad
Copy link
Owner

007revad commented Feb 4, 2025

stat /portainer: no such file or directory: unknown. is the important part of that error message. It's saying it can't find /volume1/docker/portainer (or /volume2/docker/portainer

Is there a folder named portainer in your docker shared folder? Maybe it's actually named portainer-ce or Portainer?

@leotzian
Copy link
Author

leotzian commented Feb 4, 2025

Hi my friend finally I managed portainer to work after some effords , yes there was a folder portainer in volume 1.
Now container manager is installed in volume 2 using your script, bur the docker folder is in volume 1 ( I moved it in volume 1 from volume 2 ) and all are working fine. Now I am afraid to move to volume 2 again ( M2 Drives ), because most of the containers has volume 1 settings and I must correct to volume 2 and I don't know if the system will allow me as yesterday, most of them were not working

@007revad
Copy link
Owner

007revad commented Feb 4, 2025

I prefer to keep the docker shared folder on volume 1 as it means I don't have to edit volume mapping in any containers.

@leotzian
Copy link
Author

leotzian commented Feb 4, 2025

So I will keep it mine finally docker on volume 1
Another final question because I have bother you enough I think you have 1821+ unit
I received mine with dsm 6.2.4-25556 and upgraded to 7.2.2.-72806 update 2 and using migration assistant I migrated from 416play to 1821+, but my system partition is 2.3GB instead if 7.9Gb and synology suggested me a Mode 2 reset, but this way I must start from scratch
Do you have any knowledge on this?

@007revad
Copy link
Owner

007revad commented Feb 4, 2025

How many HDDs are in the DS1821+ and what size? And how much data do you have on volume 1?

@leotzian
Copy link
Author

leotzian commented Feb 4, 2025

Ι have 4 brand new 6TB red as SHR with about 4.2TB of data.

@007revad
Copy link
Owner

007revad commented Feb 4, 2025

Do you have a backup of the 4.2TB of data?

@leotzian
Copy link
Author

leotzian commented Feb 4, 2025

I have the 416playwith exact the same data and I have a spare 6tb and 3tb and I can put them in 1821 as raid 0 ( space 8,2Tb ) and made a hyper backup to this volume
What are you thinkng? a way to increase system space from 2.9 to 7.9?

@007revad
Copy link
Owner

007revad commented Feb 4, 2025

I was thinking maybe:

  1. Export the system configuration from "Control Panel > Backup & Restore > System Configuration > Export".
  2. Shut down the DS1821+ and remove the HDDs and NVMe drives.
  3. Insert spare, empty, HDD.
  4. Setup DSM 7.
  5. Shut down the DS1821+ and insert the 4 HDDs and NVMe drives (so the NAS now has 5 HDDs).
  6. Boot the DS1821+ and let it do a drive migration.

But now I'm wondering if the drive migration would keep the 2.9 GB system partition.

Both your DS1821+ and DS416play support Migration Assistant. https://www.synology.com/en-uk/dsm/packages/MigrationAssistant

There are some limitations on when migration assistant won't work. https://kb.synology.com/en-uk/DSM/help/MigrationAssistant/migrationassistant?version=7

So assuming none of the limitations apply to your scenario I would:

  1. Delete the storage pool 1 and storage pool 2.
  2. Run migration assistant to migrate (clone) your volume and settings from the DS416play to the DS1821+.
  3. Then setup your NVMe volume etc.

@leotzian
Copy link
Author

leotzian commented Feb 5, 2025

Thnanks for your help below are my questions and the answers from synolofy support it is easier for me to do a foctory reset and them migrate again from my 416Play ( it is working fine and I han not replaced by the 1821+ yet.

======

Thank you for the feedback.

  1. Now my 1821+ runs dsm 7.2.2-72806 Update 2 is there a way to make Mode 2 reset to gain the 7.9GB system partition and then repeat the migration procedure from 416Play to 1821+ It would be more easier for me, or with migration procedure, system partition will be 2.3GB again?

Answer: If a storage pool still exists, Mode 2 reset will not gain 7.9 GB system partition and you will need to perform a factory reset. Therefore, you can back up the data first, perform a factory reset and perform Migration Assistant again. The system partition of DS1821+ will remain 7.9GB.

  1. And something else I thought in the meantime, I have a spare 3TB and a 6TB, in the 1821+ I have 4 empty slots, If I put those 2 disks as raid 0 I will have a storage pool of 8.2TB, can I backup all my system in this storage pool, using hyper backup or with the reset and THIS storage pool will be deleted?

Answer: You can back up the data to the new RAID 0 storage pool, power off DS1821+ to remove the spare 3TB and 6TB disks, and power on DS1821+ to perform a factory reset (so the data in the RAID 0 storage pool will not be erased by factory reset).

Then insert the two disks back and go to Storage Manager to click Online Assemble to access the data. Create a new storage pool with other 6TB disks and restore the data from the RAID 0 storage pool to the new storage pool.

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

No branches or pull requests

2 participants