The next generation of Giant Segmented Mirror Telescopes (GSMT) will have large gaps between the segments either caused by the shadow of the mechanical structure of the secondary mirror [European Extremely Large Telescope (E-ELT) and Thirty Meter Telescope (TMT)] or intrinsically by design [Giant Magellan Telescope (GMT)]. These gaps are large enough to fragment the aperture into independent segments that are separated by more than the typical Fried parameter. This creates piston and petals modes that are not well sensed by conventional wavefront sensors such as the Shack–Hartmann wavefront sensor or the pyramid wavefront sensor. We propose to use a new optical device, the holographic dispersed fringe sensor (HDFS), to sense and control these petal/piston modes. The HDFS uses a single pupil-plane hologram to interfere the segments onto different spatial locations in the focal plane. Numerical simulations show that the HDFS is very efficient and that it reaches a differential piston root-mean-square (rms) smaller than 10 nm for GMT/E-ELT/TMT for guide stars up to 13th J + H band magnitude. The HDFS has also been validated in the lab with Magellan adaptive optics extreme and high-contrast adaptive optics phasing testbed, the GMT phasing testbed. The lab experiments reached 5-nm rms piston error on the Magellan telescope aperture. The HDFS also reached 50-nm rms of piston error on a segmented GMT-like aperture while the pyramid wavefront sensor was compensating simulated atmosphere under median seeing conditions. The simulations and lab results demonstrate the HDFS as an excellent piston sensor for the GMT. We find that the combination of a pyramid slope sensor with an HDFS piston sensor is a powerful architecture for the GMT.