'Return the number of an unused mirror unit.'

def _get_unused_mun(self, ldev):

    pair_list = []
    for mun in range(_MAX_MUNS):
        pair_info = self._get_full_copy_pair_info(ldev, mun)
        if (not pair_info):
            return mun
        pair_list.append((pair_info['svol_info'], mun))
    for (svol_info, mun) in pair_list:
        if svol_info['is_psus']:
            self._delete_pair_based_on_svol(ldev, svol_info, no_restart=True)
            return mun
    utils.output_log(MSG.NO_AVAILABLE_MIRROR_UNIT, copy_method=utils.FULL, pvol=ldev)
    raise exception.VSPBusy()
