https://rancher.com/ logo
Title
h

hundreds-evening-84071

06/08/2022, 5:32 PM
hey guys, running rancher 2.6.5 stable release... created RKE2 cluster and also added a windows worker node... however, I see by default, it uses
c:\var\lib\rancher
as directory... is there an option - or a way I can specify something other than c-drive ? perhaps like
d:\var\lib\rancher
? reason I want to do this is to keep users-stuff off the c-drive to prevent c-drive from filling up and crashing the OS.
c

creamy-pencil-82913

06/08/2022, 5:41 PM
have you seen the --data-dir flag?
h

hundreds-evening-84071

06/08/2022, 5:45 PM
thanks! I see it now... https://docs.rke2.io/subcommands/ however, do I simply add
--data-dir
to the registration command I get from rancher UI for adding windows worker node?
c

creamy-pencil-82913

06/08/2022, 7:02 PM
You would want to add it to the args in the node config customization
the registration command has you run rancher-system-agent, so any flags you add there are passed to the agent, not to rke2 itself
h

hundreds-evening-84071

06/08/2022, 8:35 PM
when I look at the node config, there is a box for rke2.io/node-args is this where I need to add?
c

creamy-pencil-82913

06/08/2022, 9:42 PM
no, that is a record of what it was started with, changing it does not actually change the args
it would be in the cluster edit screen
you might actually have to go into the yaml options to do it
and now that I think about it, Rancher provisioning might not support this at all as it is going to expect to find things in the default install directory
h

hundreds-evening-84071

06/08/2022, 10:14 PM
hmm... interesting... not a Windows admin, but something I will experiment with - create a d:\var\lib\rancher and then make a symbolic link over to c:\var\lib\rancher... I will have to check to see if that is possible at all at OS layer first. then maybe it will be okay? ­čĄ×