  The thermodynamic geometry has been proved to be quite useful in
understanding the microscopic structure of black holes. We investigate the
phase structure, thermodynamic geometry and critical behavior of a
Reissner-Nordstrom-AdS black hole and a Reissner-Nordstrom black hole in a
cavity, which can reach equilibrium in a canonical ensemble. Although the phase
structure and critical behavior of both cases show striking resemblance, we
find that there exist significant differences between the thermodynamic
geometry of these two cases. Our results imply that there may be a connection
between the black hole microstates and its boundary condition.
