'Check EBS vols for missing/duplicate DEVICE/PARTITION/MOUNT_PATHs and
validate these settings.'

def validate_ebs_settings(self):

    volmap = {}
    devmap = {}
    mount_paths = []
    cluster = self.cluster
    for vol in cluster.volumes:
        vol_name = vol
        vol = cluster.volumes.get(vol)
        vol_id = vol.get('volume_id')
        device = vol.get('device')
        partition = vol.get('partition')
        mount_path = vol.get('mount_path')
        vmap = volmap.get(vol_id, {})
        devices = vmap.get('device', [])
        partitions = vmap.get('partition', [])
        if (devices and (device not in devices)):
            raise exception.ClusterValidationError(("Can't    attach    volume    %s    to    more    than    one    device" % vol_id))
        elif (partitions and (partition in partitions)):
            raise exception.ClusterValidationError(('Multiple    configurations    for    %s\nEither    pick    one    or    specify    a    separate    partition    for    each    configuration' % vol_id))
        vmap['partition'] = (partitions + [partition])
        vmap['device'] = (devices + [device])
        volmap[vol_id] = vmap
        dmap = devmap.get(device, {})
        vol_ids = dmap.get('volume_id', [])
        if (vol_ids and (vol_id not in vol_ids)):
            raise exception.ClusterValidationError(("Can't    attach    more    than    one    volume    on    device    %s" % device))
        dmap['volume_id'] = (vol_ids + [vol_id])
        devmap[device] = dmap
        mount_paths.append(mount_path)
        if (not device):
            raise exception.ClusterValidationError(('Missing    DEVICE    setting    for    volume    %s' % vol_name))
        if (not utils.is_valid_device(device)):
            raise exception.ClusterValidationError(('Invalid    DEVICE    value    for    volume    %s' % vol_name))
        if partition:
            if (not utils.is_valid_partition(partition)):
                raise exception.ClusterValidationError(('Invalid    PARTITION    value    for    volume    %s' % vol_name))
            if (not partition.startswith(device)):
                raise exception.ClusterValidationError(('Volume    PARTITION    must    start    with    %s' % device))
        if (not mount_path):
            raise exception.ClusterValidationError(('Missing    MOUNT_PATH    setting    for    volume    %s' % vol_name))
        if (not mount_path.startswith('/')):
            raise exception.ClusterValidationError(('MOUNT_PATH    for    volume    %s    should    start    with    /' % vol_name))
        if (mount_path == '/'):
            raise exception.ClusterValidationError(('MOUNT_PATH    for    volume    %s    cannot    be    /' % vol_name))
    for path in mount_paths:
        if (mount_paths.count(path) > 1):
            raise exception.ClusterValidationError(("Can't    mount    more    than    one    volume    on    %s" % path))
    return True
