By HDF5, you probably mean XDMF. (HDF5 is a general purpose data format, XDMF builds on top of it to provide info about functions, meshes and so forth.)
Part of the mesh I/O is a dark place in Dolfin's code, notably dolfin-convert
which can handle the situation. I'd say use dolfin-convert
to convert your mesh into Dolfin's native XML format, read that with a small script and write it out as XDMF. It should be something along the lines of
from dolfin import *
mesh = Mesh('my_mesh.xml')
mesh_file = XDMFFile(mesh.mpi_comm(), 'output.xdmf')
mesh_file << mesh
Ideally, of course, dolfin-convert
should take care of all your needs; feel free to file a bug report about this.