parstoo rambarzini
parstoo rambarzini

Reputation: 21

How to move containerd data directory to another location on ubuntu?

trying copy data from the pod and got

failed to copy: write /var/lib/containerd/io.containerd.content.v1/data: no space left on device

My /var is full and I wanna change the container's root directory, is there a way to change the directory from /var/lib/containerd/?

Upvotes: 1

Views: 11372

Answers (1)

Adiii
Adiii

Reputation: 60084

You will need to change the path in the /etc/containerd/config.toml

version = 2

# persistent data location
root = "/var/lib/containerd" # your_free_path_here

Make sure to restart containerd

sudo systemctl restart containerd

To check the container version

kubectl get nodes -o wide | grep containerd

environment-container-runtimes

containerd-as-a-kubernetes-container-runtime

Upvotes: 6

Related Questions