'Mount Quobyte volume to mount path.'

def _mount_quobyte(self, quobyte_volume, mount_path, ensure=False):

    mounted = False
    for l in QuobyteDriver.read_proc_mount():
        if (l.split()[1] == mount_path):
            mounted = True
            break
    if mounted:
        try:
            os.stat(mount_path)
        except OSError as exc:
            if (exc.errno == errno.ENOTCONN):
                mounted = False
                try:
                    LOG.info('Fixing    previous    mount    %s    which    was    not    unmounted    correctly.', mount_path)
                    self._execute('umount.quobyte', mount_path, run_as_root=self._execute_as_root)
                except processutils.ProcessExecutionError as exc:
                    LOG.warning('Failed    to    unmount    previous    mount:    %s', exc)
            else:
                LOG.warning('Unknown    error    occurred    while    checking    mount    point:    %s    Trying    to    continue.', exc)
    if (not mounted):
        if (not os.path.isdir(mount_path)):
            self._execute('mkdir', '-p', mount_path)
        command = ['mount.quobyte', '--disable-xattrs', quobyte_volume, mount_path]
        if self.configuration.quobyte_client_cfg:
            command.extend(['-c', self.configuration.quobyte_client_cfg])
        try:
            LOG.info('Mounting    volume:    %s    ...', quobyte_volume)
            self._execute(run_as_root=self._execute_as_root, *command)
            LOG.info('Mounting    volume:    %s    succeeded', quobyte_volume)
            mounted = True
        except processutils.ProcessExecutionError as exc:
            if (ensure and ('already    mounted' in exc.stderr)):
                LOG.warning('%s    is    already    mounted', quobyte_volume)
            else:
                raise
    if mounted:
        self._validate_volume(mount_path)
