Cosmic Rays in the Disk and Halo of Galaxies