I have tried various things. In essence the mount points should be available inside your podman-machine-defualt vm running linux. By default all windows drives are mounted as read only. logged into the podman-machine-default using
wsl -d podman-machine-default
then list the mounted drives using
ls -la /mnt
you should see the drives listed there so if for example you wanted to mount a read only d:/mount_volumes/postgres on your windows as the data directory for your postgres container you could create an container
podman run -d --name postgres-a -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin -p 5432:5432 -v /mnt/d/mount_volumes/postgres:/var/lib/postgresql/data docker.io/library/postgres
however since write permissions are required the above does not work.
some posts suggest starting the container with the same user passing --user option in above podman run command however that did not work for me. was not sure if the linux mount owner id has to be used or postgres container running with an id has to be used which was found via 'podman run --rm postgres id postgres' still have to dig into what that command does.
what worked for me finally was:
create named volume
podman volume create pgdata
then use the following command to create postgres container.
podman run -d --name postgres-a -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin -p 5432:5432 -v pgdata:/var/lib/postgresql/data docker.io/library/postgres
login via
podman exec -it postgres-a psql -h localhost -p 5432 -U admin
you can inspect volume using
podman volume inspect pgdata
the above still does not give me control to create the data directories in a specific directory but at least its persistent on windows host machine.