OP here - still have to try (generally operate on VM/bare metal level); but my understanding is that ioctl call would get passed to the underlying volume; i.e. you would have to mount volume
I use CREATE DATABASE dbname TEMPLATE template1; inside test containers. Have not tried this new method yet.