]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
grammar fix: s/does not exists/does not exist/g
[pve-storage.git] / PVE / Storage.pm
index ff0d944be1e8d3dcc36ad0d1396b3eaa66592b91..0bd103e914c1512e318c6a14e77c070673ecdaea 100755 (executable)
@@ -15,10 +15,12 @@ use Socket;
 
 use PVE::Tools qw(run_command file_read_firstline dir_glob_foreach $IPV6RE);
 use PVE::Cluster qw(cfs_read_file cfs_write_file cfs_lock_file);
+use PVE::DataCenterConfig;
 use PVE::Exception qw(raise_param_exc);
 use PVE::JSONSchema;
 use PVE::INotify;
 use PVE::RPCEnvironment;
+use PVE::SSHInfo;
 
 use PVE::Storage::Plugin;
 use PVE::Storage::DirPlugin;
@@ -130,7 +132,7 @@ sub storage_config {
 
     my $scfg = $cfg->{ids}->{$storeid};
 
-    die "storage '$storeid' does not exists\n" if (!$noerr && !$scfg);
+    die "storage '$storeid' does not exist\n" if (!$noerr && !$scfg);
 
     return $scfg;
 }
@@ -538,8 +540,8 @@ sub abs_filesystem_path {
     my ($cfg, $volid) = @_;
 
     my $path;
-    if (PVE::Storage::parse_volume_id ($volid, 1)) {
-       PVE::Storage::activate_volumes($cfg, [ $volid ]);
+    if (parse_volume_id ($volid, 1)) {
+       activate_volumes($cfg, [ $volid ]);
        $path = PVE::Storage::path($cfg, $volid);
     } else {
        if (-f $volid) {
@@ -573,8 +575,8 @@ sub storage_migrate {
     my $target_ip = $target_sshinfo->{ip};
     my $errstr = "unable to migrate '$volid' to '${target_volid}' on host '$target_sshinfo->{name}'";
 
-    my $ssh = PVE::Cluster::ssh_info_to_command($target_sshinfo);
-    my $ssh_base = PVE::Cluster::ssh_info_to_command_base($target_sshinfo);
+    my $ssh = PVE::SSHInfo::ssh_info_to_command($target_sshinfo);
+    my $ssh_base = PVE::SSHInfo::ssh_info_to_command_base($target_sshinfo);
     local $ENV{RSYNC_RSH} = PVE::Tools::cmd2string($ssh_base);
 
     my @cstream = ([ '/usr/bin/cstream', '-t', $ratelimit_bps ])
@@ -588,7 +590,7 @@ sub storage_migrate {
        }
     }
 
-    my @formats = volume_transfer_formats($cfg, $volid, $volid, $snapshot, $base_snapshot, $with_snapshots);
+    my @formats = volume_transfer_formats($cfg, $volid, $target_volid, $snapshot, $base_snapshot, $with_snapshots);
     die "cannot migrate from storage type '$scfg->{type}' to '$tcfg->{type}'\n" if !@formats;
     my $format = $formats[0];
 
@@ -600,7 +602,7 @@ sub storage_migrate {
 
     $with_snapshots = $with_snapshots ? 1 : 0; # sanitize for passing as cli parameter
     my $send = ['pvesm', 'export', $volid, $format, '-', '-with-snapshots', $with_snapshots];
-    my $recv = [@$ssh, '--', 'pvesm', 'import', $volid, $format, $import_fn, '-with-snapshots', $with_snapshots];
+    my $recv = [@$ssh, '--', 'pvesm', 'import', $target_volid, $format, $import_fn, '-with-snapshots', $with_snapshots];
     if (defined($snapshot)) {
        push @$send, '-snapshot', $snapshot
     }