Hydroxyl acid has become an important chemical in the field of materials and medicine due to its dual functional modules. Fortunately, Gluconobacter oxydans whole-cell catalysis is on spotlight with promising potential in bio-catalyzing polyhydroxy chemical to produce hydroxyl acids. Therefore, straight-chain primary diols (C2-C6) were investigated as substrates oxidized by G. oxydans. As results, we found a fantastic critical point of methylene-number determining end-products. G. oxydans catalyzes C4 and smaller methylene-number compounds only forming hydroxyl acids, but C5/C6 can be converted to diacids. Furthermore, it was important that we successfully selective and directionality controlled the product of C5/C6 primary diols to hydroxyl acids instead of diacids through the regulation of pH≥5.5. Finally, we successfully produced nearly 102.3 g/L 5‑hydroxyvaleric acid during 48 h with 99.8% yield by sealed-oxygen supply (SOS) biotechnology which is the highest level. These findings have important reference significance for the selective and directionality bioconversion of primary diols into hydroxyl acids and provide a promising path for the industrial development of hydroxyl acids with integrating C2-C6.