adamant-kite-43734
09/27/2023, 5:24 AMcreamy-pencil-82913
09/27/2023, 6:23 AMwooden-easter-8724
09/27/2023, 6:36 AMsalmon-hair-72590
09/27/2023, 6:38 AM--data-dir
allows us to replace /var/lib/rancher/rke2
. I overlooked that, my apologies.
--data-dir value, -d value (data) Folder to hold state (default: "/var/lib/rancher/rke2")
However, besides the rke2
directory, there's also the agent
directory as shown below. This might also be related. What do you think?
# ls -la /var/lib/rancher/
total 16
drwxr-xr-x 4 root root 4096 Apr 28 01:55 .
drwxr-xr-x 51 root root 4096 Apr 28 06:16 ..
drwx------ 4 root root 4096 Apr 28 02:25 agent
drwxr-xr-x 5 root root 4096 Apr 28 01:55 rke2
# ls -la /var/lib/rancher/agent/
total 20
drwx------ 4 root root 4096 Apr 28 02:25 .
drwxr-xr-x 4 root root 4096 Apr 28 01:55 ..
drwx------ 2 root root 4096 Apr 28 01:55 applied
-rw------- 1 root root 2279 Apr 28 02:25 rancher2_connection_info.json
drwxr-xr-x 2 root root 4096 Apr 28 02:25 tmp
salmon-hair-72590
09/27/2023, 7:51 AMcreamy-pencil-82913
09/27/2023, 8:17 AMprehistoric-gpu-28362
09/27/2023, 9:39 AM/var/lib/rancher
and it's worked nicely for ussalmon-hair-72590
09/27/2023, 11:08 AMsalmon-hair-72590
09/27/2023, 11:09 AM/va/lib/rancher
, but it seems that they are not. From my investigation, it appears that containers might be under /run/k3s/containerd
. Is this accurate?
Furthermore, in many environments, is this /run/k3s/containerd
directory typically placed on a separate disk?wooden-easter-8724
09/27/2023, 5:17 PM/run
is tmpfs and not actually on disk. Images, container metadata, logs, and such should all be in /var/lib/rancher/rke2/agent/containerd
.salmon-hair-72590
09/28/2023, 1:27 AM# ls -la /var/lib/rancher/rke2/agent/containerd
total 656
drwx------ 16 root root 4096 Apr 28 01:50 .
drwxr-xr-x 7 root root 4096 Apr 28 01:50 ..
drwx--x--x 2 root root 4096 Apr 28 01:49 bin
-rw-r--r-- 1 root root 598896 Sep 26 09:53 containerd.log
drwxr-xr-x 4 root root 4096 Apr 28 01:49 io.containerd.content.v1.content
drwxr-xr-x 4 root root 4096 Apr 28 01:50 io.containerd.grpc.v1.cri
drwx--x--x 2 root root 4096 Apr 28 01:49 io.containerd.metadata.v1.bolt
drwx--x--x 2 root root 4096 Apr 28 01:49 io.containerd.runtime.v1.linux
drwx--x--x 3 root root 4096 Apr 28 01:50 io.containerd.runtime.v2.task
drwx------ 3 root root 4096 Apr 28 01:49 io.containerd.snapshotter.v1.aufs
drwx------ 2 root root 4096 Apr 28 01:49 io.containerd.snapshotter.v1.btrfs
drwx------ 3 root root 4096 Apr 28 01:49 io.containerd.snapshotter.v1.fuse-overlayfs
drwx------ 3 root root 4096 Apr 28 01:49 io.containerd.snapshotter.v1.native
drwx------ 3 root root 4096 Apr 28 01:49 io.containerd.snapshotter.v1.overlayfs
drwx------ 4 root root 4096 Apr 28 01:49 io.containerd.snapshotter.v1.stargz
drwx--x--x 2 root root 4096 Apr 28 01:49 lib
drwx------ 2 root root 4096 Sep 26 09:30 tmpmounts