  Locally repairable codes (LRCs) are considered with equal or unequal
localities, local distances and local field sizes. An explicit two-layer
architecture with a sum-rank outer code is obtained, having disjoint local
groups and achieving maximal recoverability (MR) for all families of local
linear codes (MDS or not) simultaneously, up to a specified maximum locality $
r $. Furthermore, the local linear codes (thus the localities, local distances
and local fields) can be efficiently and dynamically modified without global
recoding or changes in architecture or outer code, while preserving the MR
property, easily adapting to new configurations in storage or new hot and cold
data. In addition, local groups and file components can be added, removed or
updated without global recoding. The construction requires global fields of
size roughly $ g^r $, for $ g $ local groups and maximum or specified locality
$ r $. For equal localities, these global fields are smaller than those of
previous MR-LRCs when $ r \leq h $ (global parities). For unequal localities,
they provide an exponential field size reduction on all previous best known
MR-LRCs. For bounded localities and a large number of local groups, the global
erasure-correction complexity of the given construction is comparable to that
of Tamo-Barg codes or Reed-Solomon codes with local replication, while local
repair is as efficient as for the Cartesian product of the local codes.
Reed-Solomon codes with local replication and Cartesian products are recovered
from the given construction when $ r=1 $ and $ h = 0 $, respectively. The given
construction can also be adapted to provide hierarchical MR-LRCs for all types
of hierarchies and parameters. Finally, subextension subcodes and sum-rank
alternant codes are introduced to obtain further exponential field size
reductions, at the expense of lower information rates.
