use PVE::Storage::ZFSPoolPlugin;
use PVE::Storage::ZFSPlugin;
use PVE::Storage::DRBDPlugin;
+use PVE::Storage::PBSPlugin;
# Storage API version. Icrement it on changes in storage API interface.
use constant APIVER => 3;
PVE::Storage::ZFSPoolPlugin->register();
PVE::Storage::ZFSPlugin->register();
PVE::Storage::DRBDPlugin->register();
+PVE::Storage::PBSPlugin->register();
# load third-party plugins
if ( -d '/usr/share/perl5/PVE/Storage/Custom' ) {
my $target_volid = "${target_storeid}:${target_volname}";
my $target_ip = $target_sshinfo->{ip};
- my $errstr = "unable to migrate '$volid' to '${target_volid}' on host '$target_sshinfo->{name}'";
my $ssh = PVE::SSHInfo::ssh_info_to_command($target_sshinfo);
my $ssh_base = PVE::SSHInfo::ssh_info_to_command_base($target_sshinfo);
or die "failed to connect to tunnel at $ip:$port\n";
# we won't be reading from the socket
shutdown($socket, 0);
- run_command([$send, @cstream], output => '>&'.fileno($socket));
+ run_command([$send, @cstream], output => '>&'.fileno($socket), errfunc => $logfunc);
# don't close the connection entirely otherwise the receiving end
# might not get all buffered data (and fails with 'connection reset by peer')
shutdown($socket, 1);
- 1 while <$info>; # wait for the remote process to finish
+
+ # wait for the remote process to finish
+ if ($logfunc) {
+ while (my $line = <$info>) {
+ chomp($line);
+ $logfunc->("[$target_sshinfo->{name}] $line");
+ }
+ } else {
+ 1 while <$info>;
+ }
+
# now close the socket
close($socket);
if (!close($info)) { # does waitpid()