Automatic storage of profiles, rods, pipes and pallets