GO:0055065: metal ion homeostasis
Any process involved in the maintenance of an internal steady state of metal ions within an organism or cell.