  Partial-MDS (PMDS) codes are a family of locally repairable codes, mainly
used for distributed storage. They are defined to be able to correct any
pattern of $s$ additional erasures, after a given number of erasures per
locality group have occurred. This makes them also maximally recoverable (MR)
codes, another class of locally repairable codes. It is known that MR codes in
general, and PMDS codes in particular, exist for any set of parameters, if the
field size is large enough. Moreover, some explicit constructions of PMDS codes
are known, mostly (but not always) with a strong restriction on the number of
erasures that can be corrected per locality group. In this paper we generalize
the notion of PMDS codes to allow locality groups of different sizes. We give a
general construction of such PMDS codes with $s=1$ global parity, i.e., one
additional erasure can be corrected. Furthermore, we show that all PMDS codes
for the given parameters are of this form, i.e., we give a classification of
these codes. This implies a necessary and sufficient condition on the
underlying field size for the existence of these codes (assuming that the MDS
conjecture is true). For some parameter sets our generalized construction gives
rise to PMDS codes with a smaller field size than any other known construction.
