I did a search for the expression, there are many sources for it , but where aircraft are concerned this one is used the most to explain it:
Michael Nunamaker writes that a friend of his in the U.S. Air Force suggested a World War II origin: "According to him, the length of the ammunition belt (feeding the machine guns) in the Supermarine Spitfire was nine yards. Therefore, when a pilot had shot all his ammunition he would say he had 'shot the whole nine yards'."