First of all, it is quite unlikely that Germany would want to do that. They just intentionally downsized their military to 180,000 soldiers in the past decades when they first reduced and then completely suspended conscription. And now that the Bundeswehr was reformed into a pure volunteer army, it has trouble getting onto its current nominal manpower, despite aggressive recruitment campaigns. In a country like Germany, with low unemployment, high education standards, low patriotism and a generally pacifist mentality among the population, the military is just not an attractive employer.
But if Germany would theoretically want to increase its army, they would have to renegotiate the two-plus-four agreement with the signatories. But two of the original signatories, the GDR and the Soviet Union, don't exist anymore. The GDR was completely integrated into the FRG, so modern Germany could represent both signatories. The successor of the Soviet Union is the Russian Federation. So that leaves us with these signatories:
- Germany
- France
- United Kingdom
- United States
- Russia
The first four are all NATO partners, close allies and would not really have a geopolitical interest in keeping the German army small. But Russia could have an interest in keeping European military forces weak.
If Russia refuses to agree to an amendment to the two-plus-four agreement, then there is still the option of just ignoring that agreement and doing it anyway. International politics is anarchy. Agreements are just as powerful as those who want to enforce them. Russia could interpret that as an act of aggression. They could interpret the situation as saying that the two-plus-four agreement is broken, therefore the German reunification is void, World War II is now technically on again and thus they now have a claim on East Germany. They could decide that it justifies armed intervention into western Europe, but if Russia would go so far as to start a full-blown war with the NATO over this is pure speculation.