Still consuming space in default data directory after configured new --data-dir
#10604
Unanswered
James4Ever0
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I'm confused, did you expect k3s to move things for you when you changed the data-dir? It is not generally recommended to change the data-dir after the node has been started once, but it should work OK if you move things yourself. I'm not sure why you'd use rsync to copy things over instead of moving? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environmental Info:
K3s version:
k3s version v1.29.6+k3s2 (b4b156d)
go version go1.21.11
Node(s) CPU architecture, OS, and Version:
Linux
redacted5.16.0-kali7-amd64 #1 SMP PREEMPT Debian 5.16.18-1kali1 (2022-04-01) x86_64 GNU/LinuxCluster Configuration:
1 server
Describe the bug:
After I configured new custom
--data-dir
in/etc/systemd/system/k3s.service
at lineExecStart
, it still saves some data under path/var/lib/rancher/k3s/data/current
Steps To Reproduce:
Expected behavior:
All data shall be stored in new directory.
Actual behavior:
Data being partly stored in old directory and mainly in new directory.
Additional context / logs:
After I used
rsync -avh --progress /var/lib/rancher/k3s <new_data_directory>
to migrate data, K3s still treats the old data like if it does not exist. K3s will download init data, pullkube-system
images and create init containers.This behavior is expected because Docker has similar bevariors too. I just want some explaination over this and how to reuse old data if possible.
Beta Was this translation helpful? Give feedback.
All reactions