'Extend an existing volume.
:param volume: volume reference
:param new_size: volume new size in GB'

def extend_volume(self, volume, new_size):

    LOG.info('Extending    volume:    %(id)s    New    size:    %(size)s    GB', {'id': volume['id'], 'size': new_size})
    if self.sparsed_volumes:
        self._execute('truncate', '-s', ('%sG' % new_size), self.local_path(volume), run_as_root=self._execute_as_root)
    else:
        block_size_mb = 1
        block_count = (((new_size - volume['size']) * units.Gi) // (block_size_mb * units.Mi))
        self._execute('dd', 'if=/dev/zero', ('seek=%d' % ((volume['size'] * units.Gi) / block_size_mb)), ('of=%s' % self.local_path(volume)), ('bs=%dM' % block_size_mb), ('count=%d' % block_count), run_as_root=True)
