'Creates a thin provisioning pool for this VG.
The syntax here is slightly different than the default
lvcreate -T, so we\'ll just write a custom cmd here
and do it.
:param name: Name to use for pool, default is "<vg-name>-pool"
:param size_str: Size to allocate for pool, default is entire VG
:returns: The size string passed to the lvcreate command'

def create_thin_pool(self, name=None, size_str=None):

    if (not self.supports_thin_provisioning(self._root_helper)):
        LOG.error('Requested    to    setup    thin    provisioning,    however    current    LVM    version    does    not    support    it.')
        return None
    if (name is None):
        name = ('%s-pool' % self.vg_name)
    vg_pool_name = ('%s/%s' % (self.vg_name, name))
    if (not size_str):
        size_str = self._calculate_thin_pool_size()
    cmd = (LVM.LVM_CMD_PREFIX + ['lvcreate', '-T', '-L', size_str, vg_pool_name])
    LOG.debug("Creating    thin    pool    '%(pool)s'    with    size    %(size)s    of    total    %(free)sg", {'pool': vg_pool_name, 'size': size_str, 'free': self.vg_free_space})
    self._execute(root_helper=self._root_helper, run_as_root=True, *cmd)
    self.vg_thin_pool = name
    return size_str
