Magnetic metals and polymers can be grown on patterned substrates so they can be used efficiently in data storage devices.