On Earth, there is enough Hydrogen and Oxygen to make 13,88 million km$^3$ of water (calculation below). However, oceans contain only a tenth of that.
Clearly, most of the hydrogen must be stored in other chemical compounds different to water. Or, as water deep within Earth's interior: some studies suggest the water on Earth's interior could contain three times as much as the water near the surface.
On the other hand there are many chemical reactions, like the well known photosynthesis and respiration, that can transform water into other compounds and vice versa.
We often think that there is a fixed amount of liquid water on Earth (plus or minus what is being recycled in the atmosphere). But it seems to me that the processes above could change the water amount significantly over geological timescales.
So my question could be stated as follows: over geological timescales, what determines the amount of liquid water on Earth?
Here are two examples of the processes I'm thinking about:
Reservoir transfers: If water from a well is removed, the ground water reservoir around it will slowly re-fill the well. Would the same happen with Earth's oceans if removed? Would water from the deep Earth's interior partially re-fill the oceans through volcanic eruptions?
Chemical balance: For a chemical reaction that can go both ways, if the reactants and products are in equilibrium and I remove the product compounds, more of them will be generated until a new equilibrium is reached. Would the same happen if I remove the water from Earth's surface? Will Hydrogen and Oxygen from rocks and air combine to partially replenish the oceans?
(This question was inspired by How much water is the atmosphere losing to space?)
Calculation of the maximum possible water on Earth
The maximum amount of water you can have on Earth is limited by the available hydrogen. Now, for each gram of bulk Earth there are 260 $\mu\text{g}$ of hydrogen and plenty of Oxygen.
Given that the Earth's mass is $5.972 \times 10^{27}$, and 260 $\mu\text{g/g}$ correspond to Hydrogen, that would total $1.552 \times 10^{24}$ g of Hydrogen, that at a molar mass of 1.007 g/mol, corresponds to $1.540 \times 10^{24}$ mol, enough to make $7.703 \times 10^{23}$ mol of water (as two atoms of hydrogen are required in a molecule of water). And since water has a molecular mass of 18.0152 g/mol, such an amount of water would weigh $1.3877\times 10^{25}$ grams. Finally, assuming a density of 1 $\text{g/cm}^3$ we get a total of $1.3877\times 10^{25}$ $\text{cm}^3$ or $13,877,025,731\, \text{km}^3$; that corresponds to 10.01 times the amount of water near Earth's surface (including oceans, lakes, rivers, ground water, etc.) and that is estimated to add up to 1,386,000,000 $\text{km}^3$.