<p>trying copy data from the pod and got</p>
<pre><code>failed to copy: write /var/lib/containerd/io.containerd.content.v1/data: no space left on device
</code></pre>
<p>My <code>/var</code> is full and I wanna change the container's root directory, is there a way to change the directory from <code>/var/lib/containerd/</code>?</p>

parstoo rambarzini
<p>you will need to change the path in the <a href="https://github.com/containerd/containerd/blob/main/docs/ops.md#base-configuration" rel="nofollow noreferrer">/etc/containerd/config.toml</a></p>
<pre><code>version = 2

# persistent data location
root = &quot;/var/lib/containerd&quot; #your_free_path_here
</code></pre>
<p>make sure to restart <code>containerd</code></p>
<pre><code>sudo systemctl restart contained

</code></pre>
<p>to check the container version</p>
<pre><code>kubectl get nodes -o wide | grep containerd
</code></pre>
<p><a href="https://kubernetes.io/docs/setup/production-environment/container-runtimes/" rel="nofollow noreferrer">environment-container-runtimes</a></p>
<p><a href="https://www.nocentino.com/posts/2021-12-27-installing-and-configuring-containerd-as-a-kubernetes-container-runtime/" rel="nofollow noreferrer">containerd-as-a-kubernetes-container-runtime</a></p>
