  Generalized Smarr relations in terms of quasilocal variables are obtained for
Schwarzschild and Reissner-Nordstr\"om black holes. The approach is based on
gravitational path integrals with finite boundaries on which, following Brown
and York, thermodynamic variables are identified through a Hamilton-Jacobi
analysis of the action. The resulting expressions allow us to construct the
relation between the quasilocal energy obtained in this setting and the Komar
and Misner-Sharp energies, which are regarded as thermodynamical internal
energy in other approaches. The quasilocal Smarr relation is obtained through
scaling arguments, and terms evaluated in the external boundary and the horizon
are present. By considering some properties of the metric, it is shown that
this quasilocal Smarr relation can be regarded as a thermodynamical realization
of Einstein equations. The approach is suitable to be generalized to any
spherically symmetric metric.
