When two unlike solvents are mixed, the final volume is more or less than expected due to differences in the size of the molecules and the strength of their intermolecular interactions, as you have noticed with mixtures of DMSO and MeOH.
The density of your final solution will allow you to calculate exact amounts of pure MeOH and DMSO to make a 2 L mixture. Luckily, lots of hard-working chemists have carefully measured the densities of many mixtures of common solvents in various ratios and at various temperatures. (Tables of these densities can be found in reference books such as the CRC Handbook of Chemistry and Physics.) There is even a publication on MeOH/DMSO mixtures with a table of densities and other physical properties (Romanowski, S. J., Kinart, C. M., and Kinart, W. J. (1995) J. chem. Soc. Faraday Trans. 91, pg. 65)
Starting with the density at the given composition and temperature of your mixture, calculate the number of moles of MeOH and DMSO in 2 L. Convert the number of moles of each solvent into mL using the densities of the pure liquids, measure out those amounts and mix.
But honestly, I wouldn’t go through the trouble unless I absolutely had to have EXACTLY 2L. As long as you measure carefully, your solvent mixture will have the correct composition regardless of the final volume. Just make a little more.
making a small donation to science.ca.