We present the results of a systematic Green Bank Telescope and Giant Metrewave Radio Telescope survey for 21-cm absorption in a sample of 10 damped Lyman α systems (DLAs) at 2 ≤zabs≤ 3.4. Analysis of L-band very long baseline array images of the background QSOs are also presented. We detect 21-cm absorption in only one DLA (at zabs= 3.1745 towards J1337+3152). Thus the detection rate of 21-cm absorption is ∼10 per cent when no limit on the integrated optical depth (∫τ(v)dv) is imposed and ∼13 per cent for a 3σ limit of 0.4 km s−1. Combining our data with the data from the literature (a sample of 28 DLAs) and assuming the measured core fraction at milliarcsecond scale to represent the gas covering factor, we find that the H i gas in DLAs at z≥ 2 is predominantly constituted by a warm neutral medium. The detection rate of 21-cm absorption seems to be higher for systems with higher N(H i) or metallicity. However, no clear correlation is found between the integrated 21-cm optical depth (or the spin temperature, TS) and either N(H i), metallicity or velocity spread of the low-ionization species. There are 13 DLAs in our sample for which high-resolution optical spectra covering the expected wavelength range of H2 absorption are available. We report the detection of H2 molecules in the zabs= 3.3871 21-cm absorber towards J0203+1134 (PKS 0201+113). In eight cases, neither H2 (with molecular fraction f(H2) ≤ 10−6) nor 21-cm absorption (with TS/fc≥ 700 K) is detected. The lack of 21-cm and H2 absorption in these systems can be explained if most of the H i in these DLAs originates from low-density high-temperature gas. In one case we have a DLA with 21-cm absorption not showing H2 absorption. In two cases, both species are detected but do not originate from the same velocity component. In the remaining two cases 21-cm absorption is not detected despite the presence of H2 with evidence for the presence of cold gas. All this is consistent with the idea that the H2 components seen in DLAs are compact (with sizes of ≤15 pc) and contain only a small fraction (i.e. typically ≤10 per cent) of the total N(H i) measured in the DLAs. This implies that the molecular fractions f(H2) reported from the H2 surveys should be considered as conservative lower limits for the H2 components.