If the debt for which the mortgage, lien, or incumbrance is held is not all due, so soon as sufficient of the property has been sold to pay the amount due, with costs, the sale must cease; and afterwards, as often as more becomes due, for principal or interest, the Court may, on motion, order more to be sold. But if the property cannot be sold in portions, without injury to the parties, the whole may be ordered to be sold in the first instance, and the entire debt and costs paid, there being a rebate of interest where such rebate is proper.
Ca. Civ. Proc. Code § 728