Beispiel #1
0
    def copy(self, src, dest):
        """
        Copy all data from one volume to another
            > lunr-storage-admin tools copy \
                /dev/lunr-volume/8275d343-365b-4966-a652-43271adbe9e5 \
                /dev/lunr-volume/b206deda-df9f-473c-8a72-b3df09dd3b1d
        """
        helper = self.load_conf(self.config)

        if not os.path.exists(src):
            src = helper.volumes.get(src)['path']

        if not os.path.exists(dest):
            dest = helper.volumes.get(dest)['path']

        if not confirm("Copy from '%s' to '%s'" % (src, dest)):
            return

        ISCSIDevice.copy_volume(src, dest)
Beispiel #2
0
    def copy(self, src, dest):
        """
        Copy all data from one volume to another
            > lunr-storage-admin tools copy \
                /dev/lunr-volume/8275d343-365b-4966-a652-43271adbe9e5 \
                /dev/lunr-volume/b206deda-df9f-473c-8a72-b3df09dd3b1d
        """
        helper = self.load_conf(self.config)

        if not os.path.exists(src):
            src = helper.volumes.get(src)['path']

        if not os.path.exists(dest):
            dest = helper.volumes.get(dest)['path']

        if not confirm("Copy from '%s' to '%s'" % (src, dest)):
            return

        ISCSIDevice.copy_volume(src, dest)