The chemical reactions and pathways involving glucans, polysaccharides consisting only of glucose residues.