diff --git a/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm b/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm index 1b9458df9..99362bbf1 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm @@ -1,6 +1,7 @@ package xCAT_plugin::iscsi; use xCAT::Table; use Socket; +use File::Path; use Getopt::Long; Getopt::Long::Configure("bundling"); Getopt::Long::Configure("pass_through"); @@ -81,6 +82,9 @@ sub process_request { $callback->({error=>["$node: Unable to identify file to back iSCSI LUN, no iscsidir in site table nor iscsi.file entry for node"],errorcode=>[1]}); next; } + unless (-d $iscsiprefix) { + mkpath $iscsiprefix; + } $fileloc = "$iscsiprefix/$node"; $iscsitab->setNodeAttribs($node,{file=>$fileloc}); }