We consider a storage model where the input and demand are modulated by an underlying Markov chain. Such models arise in data communication systems. The input is a Markov-compound Poisson process and the demand is a Markov linear process. The demand is satisfied if physically possible. We study the properties of the demand and its inverse, which may be viewed as transformed time clocks. We show that the unsatisfied demand is related to the infimum of the net input and that, under suitable conditions, it is an additive functional of the input process. The study of the storage level is based on a detailed analysis of the busy period, using techniques based on infinitesimal generators. The transform of the busy period is the unique solution of a certain matrix-functional equation. Steady state results are also obtained; these are not obvious generalizations of the results for simple storage models. In particular, a generalization of the Pollaczek-Khinchin formula brings new insight.