From e1b18dc7766f92cfe5e0c71147cb8e2d8181cb62 Mon Sep 17 00:00:00 2001 From: phamt Date: Wed, 21 Dec 2011 17:40:40 +0000 Subject: [PATCH] Fixed copydisk option to use Linux dd as failover. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11285 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index e670706e8..2a12311c2 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -860,6 +860,8 @@ sub changeVM { } #*** Use flashcopy *** + # Flashcopy only supports ECKD volumes + my $ddCopy = 0; $out = `ssh $hcp "vmcp flashcopy"`; if ( $out =~ m/HCPNFC026E/i ) { @@ -885,8 +887,7 @@ sub changeVM { xCAT::zvmUtils->printLn( $callback, "$tgtNode: (Error) Flashcopy lock is enabled" ); return; - } - else { + } else { # Enable lock $out = `ssh $hcp "touch /tmp/.flashcopy_lock"`; @@ -909,13 +910,14 @@ sub changeVM { # Remove lock $out = `ssh $hcp "rm -f /tmp/.flashcopy_lock"`; } + } else { + $ddCopy = 1; } - else { - - # Flashcopy not supported + # Flashcopy not supported, use Linux dd + if ($ddCopy) { #*** Use Linux dd to copy *** - xCAT::zvmUtils->printLn( $callback, "$tgtNode: FLASHCOPY not supported. Using Linux DD" ); + xCAT::zvmUtils->printLn( $callback, "$tgtNode: FLASHCOPY not working. Using Linux DD" ); # Enable disks $out = xCAT::zvmUtils->disableEnableDisk( $callback, $hcp, "-e", $tgtLinkAddr );