[5] forms (vitamers) of vitamin D exist (see table). The two major forms are vitamin D2 or ergocalciferol, and vitamin D3 or cholecalciferol, vitamin D without a subscript refers to either D2 or D3 or both. These are known collectively as calciferol....Vitamin D3 (cholecalciferol) is produced by ultraviolet irradiation (UV) of its precursor 7-dehydrocholesterol. This molecule occurs naturally in the skin of animals and in milk. Vitamin D3 can be made by exposure of the skin to UV, or by exposing milk directly to UV (one commercial method).
------
Vitamin D3 (cholecalciferol) is produced industrially by exposing 7-dehydrocholesterol to UVB light, followed by purification.[143] The 7-dehydrocholesterol is a natural substance in wool grease (lanolin) from sheep or other woolly animals. Vitamin D2 (ergocalciferol) is produced in a similar way using ergosterol from yeast or mushrooms as a starting material.[143]
Tl;dr of 5 types & only D2 and D3 are commercial avail
--Wikipedia: http://en.wikipedia.org/wiki/Vitamin_D