From ea2114d9ef7913243133557c26d75d9e0a4a2677 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 1 Oct 2012 19:52:23 +0000 Subject: [PATCH] Fix problem where tgtadm as of late frequently prefers iSER, which would be great but has some steeper underlying requirements that make it harder to use. Software iscsi for now continues to be intended primarily for prototyping, with an expectation of beefier storage. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13926 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/iscsi.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/iscsi.pm b/xCAT-server/lib/xcat/plugins/iscsi.pm index b967f603d..3da743b33 100644 --- a/xCAT-server/lib/xcat/plugins/iscsi.pm +++ b/xCAT-server/lib/xcat/plugins/iscsi.pm @@ -148,10 +148,10 @@ sub process_request { $targname = "iqn.$year-$month.$domain:$node"; $iscsitab->setNodeAttribs($node,{target=>$targname}); } - system("tgtadm --mode target --op delete --tid ".get_tid($node)." -T $targname"); - my $rc = system("tgtadm --mode target --op new --tid ".get_tid($node)." -T $targname"); + system("tgtadm --lld iscsi --mode target --op delete --tid ".get_tid($node)." -T $targname"); + my $rc = system("tgtadm --lld iscsi --mode target --op new --tid ".get_tid($node)." -T $targname"); if ($rc) { - $rsp{error}=["tgtadm --mode target --op new --tid ".get_tid($node)." -T $targname returned $rc"]; + $rsp{error}=["tgtadm --lld iscsi --mode target --op new --tid ".get_tid($node)." -T $targname returned $rc"]; if ($rc == 27392) { push @{$rsp{error}},"This likely indicates the need to do /etc/init.d/tgtd start"; } @@ -160,17 +160,17 @@ sub process_request { %rsp=(name=>[$node]); next; } - $rc = system("tgtadm --mode logicalunit --op new --tid ".get_tid($node)." --lun 1 --backing-store $fileloc --device-type disk"); + $rc = system("tgtadm --lld iscsi --mode logicalunit --op new --tid ".get_tid($node)." --lun 1 --backing-store $fileloc --device-type disk"); if ($rc) { - $rsp{error}=["tgtadm --mode logicalunit --op new --tid ".get_tid($node)." --lun 1 --backing-store $fileloc returned $rc"]; + $rsp{error}=["tgtadm --lld iscsi mode logicalunit --op new --tid ".get_tid($node)." --lun 1 --backing-store $fileloc returned $rc"]; $rsp{errorcode} = [1]; $callback->({node=>[\%rsp]}); %rsp=(name=>[$node]); next; } - $rc = system("tgtadm --mode target --op bind --tid ".get_tid($node)." -I ".inet_ntoa(inet_aton($node))); + $rc = system("tgtadm --lld iscsi --mode target --op bind --tid ".get_tid($node)." -I ".inet_ntoa(inet_aton($node))); if ($rc) { - $rsp{error}=["tgtadm --mode target --op bind --tid ".get_tid($node)." -I ".inet_ntoa(inet_aton($node)) . " returned $rc"]; + $rsp{error}=["tgtadm --lld iscsi --mode target --op bind --tid ".get_tid($node)." -I ".inet_ntoa(inet_aton($node)) . " returned $rc"]; $rsp{errorcode} = [1]; $callback->({node=>[\%rsp]}); %rsp=(name=>[$node]);