Commit e86e345d authored by Felix Seibert's avatar Felix Seibert
Browse files

remove unnecessary step in external layout realization for slurm mode

parent 12b3ccb0
......@@ -336,7 +336,6 @@ class OSDManager(object):
command_list = []
host_name = ""
# command = ""
for key in osd_to_folders_map.keys():
if host_name == "":
host_name = osd_to_host_map[key]
......@@ -344,20 +343,20 @@ class OSDManager(object):
for move_folder in osd_to_folders_map[key]:
folder_path = self.get_absolute_file_path(move_folder)
folder_tmp_path = os.path.join(tmp_dir, os.path.split(move_folder)[1])
# copy folder to temporary location
# move folder to temporary location
command += "srun -N1-1 --nodelist=" + host_name
command += " cp -r " + folder_path + " " + tmp_dir + " ; "
# delete folder within the managed xtreemfs folder
command += " mv " + folder_path + " " + tmp_dir + " ; "
# copy folder back from temporary location to initial location
command += "srun -N1-1 --nodelist=" + host_name
command += " rm -r " + folder_path + " ; "
# copy folder back from temporary location
command += " cp -r " + folder_tmp_path + " " + os.path.split(folder_path)[0] + " ; "
# delete folder from temporary location
command += "srun -N1-1 --nodelist=" + host_name
command += " rm -r " + folder_tmp_path + " ; "
if len(osd_to_folders_map[key]) > 0:
if len(command) > 0:
command_list.append(command)
# command_list.append(command)
return command_list
def move_folder_to_osd(self, folder_id: str, new_osd_id: str, tmp_dir=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment