My dad tells me that the "whole nine yards" was the length of the machine gun belts used by the U.S. fighter pilots in the Second World War. i.e. meaning to use up the full amount.
I always had the impression it was something to do with baseball. The rules say the dugout has to be something like 9 yards from the baselines and I have heard the phrase 'ran the whole nine yards' and assumed it to be something to do with a batter finishing a home run by running back to the dugout. ??? Could be way off.
The world war II answer is correct. The ammunition belts used by American fighters were 27 feet long (9 yards) so if a pilot came back with no ammunition he gave it "the whole nine yards"
The early British Nave was desiging ne uniforms for the navy men and one designer siad that it would require 8 3/4 yards and the officials said "Use the Whole Nine Yards"