The Naïve and Wrong Approach
Use the ideal gas law, $PV=nRT$, can give you a first-order approximation. This fails, though, because water is not a gas. It does not need to observe the ideal gas law. (In fact, many gasses do not follow the ideal gas law.) Other equations of state could yield a more accurate answer. The application of these equations to this situation is, at best, grasping as straws, and at worse, simply wrong.
Pressure Is Independent of Volume
Pressure, in liquids, is independent of volume. (Temperature, density, and pressure, however, are very linked.) A steel pipe, closed at both ends, can hold water at all sorts of pressures; high pressures, low pressures, and less-than atmospheric pressures. Knowing the volume of a pipe system, especially a closed one, gives you no indication of the pressure of the liquid inside.
Depth-Pressure Relationship
There is, however, a depth-pressure relationship. Imagine, if you would, a vertical pipe full of water. The water forms a "water column," which is referred to extensively in all sorts of guides. The pressure at any given point in the water column is based off of the fluid's density, depth at that point, and gravity. (This is the common $P=\rho gh$ people ought to remember from their high school physics.)
Bernoulli's Equation
There is also Bernoulli's Equation, which can be used to determine the pressure of a liquid in a tube. A quick look at the equation confirms that there is no relation to volume. (Cross-sectional volume is a thing, but the question does not ask about that.)
A Tutorial On Real-World Plumbing
If you want to know the pressure needed for actual plumbing, I suggest looking at the two part guide from John Hearfield. It is a very digestible guide to the complicated world of Reynold Numbers, viscosity, and the interactions which go into water moving down a pipe.
Elastic Pipes and Internal Pressure
Pipes do experience pressure from the inside and outside, and the material the pipe is made out of does help to determine if a pipe expands or contracts. For most civilian applications, the expansion and contraction of pipes due to water pressure is negligible.
However, if you really want to know how a pipe of a given material stretches/inflates due to pressure on the inside, you need to learn about isotropic stress and strain. Try this in your approach:
- Distribute the pressure evenly. This means that each unit of area of the pipe experiences the same force from the liquid as every other, equally sized unit of area.
- Examine a small piece of pipe, such as a unit of area.
- The force acting on the pipe is the pressure difference between outside and inside of the pipe.
- Treat each section of your pipe as a spring-like substance. Instead of using the normal hooke's law, $F = -kx$, use the version with stress ($\sigma$), strain($\epsilon$), and elastic modulus (E) $\sigma = E \epsilon$.
- figure out how your individual pieces of your pipe react
- Sum up these changes to figure out what happens to the pipe as a whole
This is just a basic approach; there are more complicated ones!