Run container in cluster
I have 2 node in cluster, node1 and node2. They share the same HOME directory with lustre. If I run a container on node1, it will take some record in ~/.local/share/containers/storage/overlay-containers. And run in /run/user/1000/containers. But on node2 there is not /run/user/1000/containers. Because of share HOME directory, there is ~/.local/share/containers/storage/overlay-containers on node2. So there is some error on node2. How could I redirect ~/.local/share/containers/storage/overlay-containers to the local directory on node1 and node2?
None via Podman <podman@lists.podman.io> writes:
I have 2 node in cluster, node1 and node2. They share the same HOME directory with lustre. If I run a container on node1, it will take some record in ~/.local/share/containers/storage/overlay-containers. And run in /run/user/1000/containers. But on node2 there is not /run/user/1000/containers. Because of share HOME directory, there is ~/.local/share/containers/storage/overlay-containers on node2. So there is some error on node2. How could I redirect ~/.local/share/containers/storage/overlay-containers to the local directory on node1 and node2?
You need to use a different storage for the second node, so on node2 you need to use something like: podman --root ~/.local/share/containers/storage-2
On 4/27/22 05:10, Giuseppe Scrivano wrote:
None via Podman <podman@lists.podman.io> writes:
I have 2 node in cluster, node1 and node2. They share the same HOME directory with lustre. If I run a container on node1, it will take some record in ~/.local/share/containers/storage/overlay-containers. And run in /run/user/1000/containers. But on node2 there is not /run/user/1000/containers. Because of share HOME directory, there is ~/.local/share/containers/storage/overlay-containers on node2. So there is some error on node2. How could I redirect ~/.local/share/containers/storage/overlay-containers to the local directory on node1 and node2? You need to use a different storage for the second node, so on node2 you need to use something like: podman --root ~/.local/share/containers/storage-2
Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
You can permanently do this in /etc/containers/storage.conf # rootless_storage_path = "$HOME/.local/share/containers/storage"
I only want to when I pull an image on node1, and then I can see the image on node2 when I exec "podman images". So I store it into share directory.
None via Podman <podman@lists.podman.io> writes:
I only want to when I pull an image on node1, and then I can see the image on node2 when I exec "podman images". So I store it into share directory.
in that case you'll need to override the run directory with `--runroot` and make sure it points to a directory that exists on both nodes. An alternative fix could be to setup an additional store that you populate from node1, and then use it from node2, more details on how to do it here: https://www.redhat.com/sysadmin/image-stores-podman
participants (3)
-
Daniel Walsh -
Giuseppe Scrivano -
ugiwgh@qq.com