'Copy a linear volume.'

def linear_copy_volume(self, src_name, dest_name, dest_bknd_name):

    self._request('/volumecopy', dest_name, dest_vdisk=dest_bknd_name, source_volume=src_name, prompt='yes')
    count = 0
    while True:
        tree = self._request('/show/volumecopy-status')
        return_code = tree.findtext(".//PROPERTY[@name='return-code']")
        if (return_code == '0'):
            status = tree.findtext(".//PROPERTY[@name='progress']")
            progress = False
            if status:
                progress = True
                LOG.debug('Volume    copy    is    in    progress:    %s', status)
            if (not progress):
                LOG.debug('Volume    copy    completed:    %s', status)
                break
        else:
            if (count >= 5):
                LOG.error('Error    in    copying    volume:    %s', src_name)
                raise exception.DotHillRequestError
            time.sleep(1)
            count += 1
    time.sleep(5)
