More than two million Muslim pilgrims have gathered in the holy city of Mecca in Saudi Arabia to perform the initial rites of the hajj.