'Creates a new lun.
:param volume:  volume object provided by the Manager'

@utils.synchronized('vmem-lun')
def _create_lun(self, volume):

    spec_dict = {}
    selected_pool = {}
    size_mb = (volume['size'] * units.Ki)
    full_size_mb = size_mb
    LOG.debug('Creating    LUN    %(name)s,    %(size)s    MB.', {'name': volume['name'], 'size': size_mb})
    spec_dict = self._process_extra_specs(volume)
    try:
        selected_pool = self._get_storage_pool(volume, size_mb, spec_dict['pool_type'], 'create_lun')
    except exception.ViolinResourceNotFound:
        raise
    except Exception:
        msg = _('No    suitable    storage    pool    found')
        LOG.exception(msg)
        raise exception.ViolinBackendErr(message=msg)
    try:
        self._send_cmd(self.vmem_mg.lun.create_lun, 'Create    resource    successfully.', volume['id'], spec_dict['size_mb'], selected_pool['dedup'], selected_pool['thin'], full_size_mb, storage_pool_id=selected_pool['storage_pool_id'])
    except exception.ViolinBackendErrExists:
        LOG.debug('Lun    %s    already    exists,    continuing.', volume['id'])
    except Exception:
        LOG.exception('Lun    create    for    %s    failed!', volume['id'])
        raise
