Can I create a postgres volumes on external storage?

I try to create a volumes on USB device, volumes works but the directory that i specified in docker-compose is empty and then if i move device there isn’t data persistent