Replies: 3 comments 3 replies
-
I can't quite tell what's going on with your config template, the formatting does not appear to have carried over well when you pasted it into your comment. Have you considered just putting /var/lib/rancher on a dedicated partition? |
Beta Was this translation helpful? Give feedback.
-
The default rke2 cluster started by rancher is to deploy /var/lib/rancher under the root partition. My root partition space is small, how can I migrate it to the mount disk? |
Beta Was this translation helpful? Give feedback.
-
Move the files over, and remount the disk at /var/lib/rancher? |
Beta Was this translation helpful? Give feedback.
-
rke2 版本v1.23.17-rke2r1
After I started the rke2 cluster with rancher, the default containerd data store is on the system disk, but my system disk is too small, I need to migrate it to the data directory on the data disk. I according to the official documentation in the/var/lib/rancher/rke2/agent/etc/containerd new created config/directory,config.toml.tmpl. file content is as follows:
disabled_plugins = []
imports = []
oom_score = 0
plugin_dir = ""
required_plugins = []
root = "/data/containerd"
state = "/data/k3s/containerd"
disabled_plugins = []
imports = []
temp = ""
version = 2
[cgroup]
path = ""
[debug]
address = ""
format = ""
gid = 0
level = ""
uid = 0
[grpc]
address = "/data/k3s/containerd/containerd.sock"
gid = 0
max_recv_message_size = 16777216
max_send_message_size = 16777216
tcp_address = ""
tcp_tls_ca = ""
tcp_tls_cert = ""
tcp_tls_key = ""
uid = 0
[plugins."io.containerd.internal.v1.opt"]
path = "/var/lib/rancher/rke2/agent/containerd"
[plugins."io.containerd.grpc.v1.cri"]
stream_server_address = "127.0.0.1"
stream_server_port = "10010"
enable_selinux = false
sandbox_image = "index.docker.io/rancher/pause:3.6"
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "overlayfs"
disable_snapshot_annotations = true
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia]
privileged_without_host_devices = false
runtime_engine = ""
runtime_root = ""
Then I restarted the rke2-service service, but the data was still on the system disk and my configuration did not take effect.
Beta Was this translation helpful? Give feedback.
All reactions