I stopped Maria DB, moved the /mnt/HD_a4/.@database@ folder to /mnt/HD/HD_a2/ and then created a symbolic link from named /mnt/HD_a4/.@database@ pointing to the actual Maria DB directory structure now located at /mnt/HD/HD_a2/.@database@ then restarted the Maria DB server.
This configuration survives reboots, I would assume will survive firmware updates and there is no need to try change any Maria DB configuration files.
It’s strange why WD configured Maria DB the way they did and put the database on a small partition.