def _make_link(volume_path, backup_path, vol_id):
 try:
  utils.execute('ln', volume_path, backup_path, run_as_root=True, check_exit_code=True)
 except processutils.ProcessExecutionError as exc:
  err = (_('backup: %(vol_id)s failed to create device hardlink from %(vpath)s to %(bpath)s.\nstdout: %(out)s\n stderr: %(err)s') % {'vol_id': vol_id, 'vpath': volume_path, 'bpath': backup_path, 'out': exc.stdout, 'err': exc.stderr})
  LOG.error(err)
  raise exception.InvalidBackup(reason=err)

def _make_link ( volume_path , backup_path , vol_id ) : try : utils . execute ( 'ln' , volume_path , backup_path , run_as_root = True , check_exit_code = True ) except processutils . ProcessExecutionError as exc : err = ( _ ( 'backup: %(vol_id)s failed to create device hardlink from %(vpath)s to %(bpath)s.\nstdout: %(out)s\n stderr: %(err)s' ) % { 'vol_id' : vol_id , 'vpath' : volume_path , 'bpath' : backup_path , 'out' : exc . stdout , 'err' : exc . stderr } ) LOG . error ( err ) raise exception . InvalidBackup ( reason = err )
create a hard link for the volume block device .