Hi everyone, I started a process to move rke2 data...
# rke2
a
Hi everyone, I started a process to move rke2 data dir provisioned with rancher Started with workers, cordon, drain, delete from cluster, cleanup and added again with 'data-dir: "/.../rke2"', everything works fine Today I try to do the same with master nodes (etcd and control-plane), same process but kube-apiserver probe never gets done continues in thread
rke2-server dont show any error logs rancher-system-agent:
Copy code
Apr 14 13:20:09 <http://master1.com|master1.com> rancher-system-agent[7707]: time="2025-04-14T13:20:09Z" level=error msg="error loading x509 client cert/key for probe kube-apiserver (/var/lib/rancher/rke2/server/tls/client-kube-apiserver.>

Apr 14 13:20:09 <http://master1.com|master1.com> rancher-system-agent[7707]: time="2025-04-14T13:20:09Z" level=error msg="error loading CA cert for probe (kube-apiserver) /var/lib/rancher/rke2/server/tls/server-ca.crt: open /var/lib/ranch>

Apr 14 13:20:09 <http://master1.com|master1.com> rancher-system-agent[7707]: time="2025-04-14T13:20:09Z" level=error msg="error while appending ca cert to pool for probe kube-apiserver"
the file /var/lib/rancher/rke2/server/tls/server-ca.crt was on the configured directory in
/etc/rancher/rke2/config.yaml
After some research I found this https://github.com/rancher/rancher/issues/37802#issuecomment-1136437259 This limitation continues? I'm surprised it worked with the workers. I found here support for a env var RKE2_DATA_DIR, I tried export the var and add the node, but same result https://github.com/rancher/system-agent-installer-rke2/commits/main/package/run.sh
c
we don’t technically support changing the data-dir on existing nodes. You should set data-dir when initially provisioning the cluster. If you need to put things on a different disk later, you’d probably be better off using bind mounts or something, instead of trying to change the path.
a
Thanks @creamy-pencil-82913, i tried stop rke2 and rancher service, move the directories to another disk and made a ln, but no work, maybe in the mv process somethings was corrupted, because after trying to back to starting point, rke2 not start. Logs says etcd persistence was not accesible. I did not investigate the problem in depth. I removed the node and added again. Only a comment.