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

adding option to not copy actual data when using copy_folders

parent d6123569
......@@ -146,7 +146,17 @@ class OSDManager(object):
def copy_folders(self, folders, environment='LOCAL', remote_source=None, sshfs_mount_dir='/tmp/sshfs_tmp_mnt',
apply_layout=True, random_osd_assignment=False):
apply_layout=True, execute_copy=True, random_osd_assignment=False):
if self.debug:
print("calling copy_folders with:")
print("folders: " + str(folders))
print("environment: " + str(environment))
print("remote_source: " + str(remote_source))
print("sshfs_mount_dir: " + str(sshfs_mount_dir))
print("apply_layout: " + str(apply_layout))
print("execute_copy: " + str(execute_copy))
print("random_osd_assignemnt: " + str(random_osd_assignment))
if not div_util.check_for_executable('du'):
raise ExecutableNotFoundException("No du found. Please make sure it is contained in your PATH.")
......@@ -205,7 +215,8 @@ class OSDManager(object):
print("osd manager after new folders have been added to data distribution:")
self.__copy_data(new_folders, environment, remote_source)
if execute_copy:
self.__copy_data(new_folders, environment, remote_source)
moves a folder from one OSD to another OSD. you may specify a temporary folder.
......@@ -22,6 +22,8 @@ parser.add_argument("--copy", "-c", action='store_const', const=True, default=Fa
help='Copy from the directories (comma-separated) specified by --source-folders to the'
' folder specified by target_folder, which must be onto an XtreemFS volume')
parser.add_argument("--dont-execute-copy", action='store_const', const=False, default=True)
parser.add_argument("--new-folders", action='store_const', const=True, default=False,
help='For each subdirectory of each folder specified by --source-folders, create'
' a corresponding folder in the folder specified by target_folder and'
......@@ -76,7 +78,8 @@ if args.copy:
folders = args.source_folders[0].split(',')
x_man.copy_folders(folders, environment=args.environment, apply_layout=(not args.random_layout),
remote_source=args.remote_source[0], random_osd_assignment=args.random_osd_assignment)
remote_source=args.remote_source[0], random_osd_assignment=args.random_osd_assignment,
execute_copy=(not args.dont_execute_copy))
elif args.new_folders:
if len(args.source_folders) == 0:
Supports Markdown
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