Besides the classical role of vitamin D on calcium and bone homeostasis , vitamin D deficiency has recently been identified as a contributing factor in the onset of insulin resistance in type 2 diabetes mellitus .