Mount a tmpfs folder on startup (volatile) with a created subfolder

One way to tackle this would be to create a new systemd service (or modify an exiting one) to handle creating this directory in your /var/volatile tempfs using the unit directive.

Description=Tempfs initialize

ExecStart=mkdir -p /var/volatile/subfolder


Add this to /etc/systemd/system/tmpfsinit and then perform the usual systemctl daemon-reload && systemctl enable tempfsinit.

Alternatively, if you already have a custom systemd service, you could also add the After unit directive and the command to create the subdir you need into a ExecStartPre command.