raise_param_exc({ volume => $@ }) if $@;
} else {
- raise_param_exc({ volume => "no storage speficied - incomplete volume ID" })
+ raise_param_exc({ volume => "no storage specified - incomplete volume ID" })
if !$storeid;
$volid = "$storeid:$volume";
if ($vtype eq 'backup'
&& $path =~ /(.*\/vzdump-\w+-\d+-\d{4}_\d{2}_\d{2}-\d{2}_\d{2}_\d{2})[^\/]+$/) {
my $logpath = "$1.log";
- # try to cleanup our backup log file too, if still exisiting, #318
+ # try to cleanup our backup log file too, if still existing, #318
unlink($logpath) if -e $logpath;
}
};
# do all parameter checks first
- # then do all short running task (to raise errors befor we go to background)
+ # then do all short running task (to raise errors before we go to background)
# then start the worker task
my $worker = sub {
my $monhostlist = {};
- # get all ip adresses from mon_host
+ # get all ip addresses from mon_host
my $monhosts = [ split (/[ ,;]+/, $config->{global}->{mon_host} // "") ];
foreach my $monhost (@$monhosts) {
};
# if something goes wrong, we do not want
- # to give up, but indicate an error has occured
+ # to give up, but indicate an error has occurred
warn "$@\n" if $@;
my $uuids = {
die "No valid block device\n" if index($dev, $block_dev) == -1;
$block_dev = "/dev/$block_dev";
- die "Block device does not exsists\n" if !(-b $block_dev);
+ die "Block device does not exists\n" if !(-b $block_dev);
return $block_dev;
}
my $partition;
- # loop again to detect the real partiton device which does not always follow
+ # loop again to detect the real partition device which does not always follow
# a strict $devname$partition scheme like /dev/nvme0n1 -> /dev/nvme0n1p1
dir_glob_foreach("/sys/block/$devname", qr/\Q$devname\E.*$newpartid/, sub {
my ($part) = @_;
# storage_can_replicate:
# return true if storage supports replication
-# (volumes alocated with vdisk_alloc() has replication feature)
+# (volumes allocated with vdisk_alloc() has replication feature)
sub storage_can_replicate {
my ($cfg, $storeid, $format) = @_;
my ($operation, $storage_list, $override) = @_;
# called for each limit (global, per-storage) with the 'default' and the
- # $operation limit and should udpate $override for every limit affecting
+ # $operation limit and should update $override for every limit affecting
# us.
my $use_global_limits = 0;
my $apply_limit = sub {
# don't do default deps, systemd v241 generator produces ordering deps on both
# local-fs(-pre) and remote-fs(-pre) targets if we use the required _netdev
-# option. Over thre corners this gets us an ordering cycle on shutdown, which
+# option. Over three corners this gets us an ordering cycle on shutdown, which
# may make shutdown hang if the random cycle breaking hits the "wrong" unit to
# delete.
my $unit = <<"EOF";
sub clone_image {
my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
- die "storage definintion has no path\n" if !$scfg->{path};
+ die "storage definition has no path\n" if !$scfg->{path};
my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
$class->parse_volname($volname);
die "unsupported format '$fmt'" if $fmt ne 'raw';
- die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
+ die "illegal name '$name' - should be 'vm-$vmid-*'\n"
if $name && $name !~ m/^vm-$vmid-/;
my $vgs = lvm_vgs();
# step 3: save to be safe ...
$execute_remote_command->($scfg, $timeout, $targetcli, 'saveconfig');
- # update interal cache
+ # update internal cache
$free_lu_name->($scfg, $volname);
last;
die "unsupported format '$fmt'" if $fmt ne 'raw';
- die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
+ die "illegal name '$name' - should be 'vm-$vmid-*'\n"
if $name && $name !~ m/^vm-$vmid-/;
my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
my $repo = PVE::PBSClient::get_repository($scfg);
- # artifical url - we currently do not use that anywhere
+ # artificial url - we currently do not use that anywhere
my $path = "pbs://$repo/$name";
return ($path, $vmid, $vtype);
}
}
- die "$storeid: Cannot find datastore '$datastore', check permissions and existance!\n";
+ die "$storeid: Cannot find datastore '$datastore', check permissions and existence!\n";
}
sub deactivate_storage {
},
maxfiles => {
description => "Deprecated: use 'prune-backups' instead. " .
- "Maximal number of backup files per VM. Use '0' for unlimted.",
+ "Maximal number of backup files per VM. Use '0' for unlimited.",
type => 'integer',
minimum => 0,
optional => 1,
# Storage implementation
# called during addition of storage (before the new storage config got written)
-# die to abort additon if there are (grave) problems
+# die to abort addition if there are (grave) problems
# NOTE: runs in a storage config *locked* context
sub on_add_hook {
my ($class, $storeid, $scfg, %param) = @_;
my $path = $scfg->{path};
- die "storage definintion has no path\n" if !$path;
+ die "storage definition has no path\n" if !$path;
my $subdir = $vtype_subdirs->{$vtype};
my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
# this only works for file based storage types
- die "storage definintion has no path\n" if !$scfg->{path};
+ die "storage definition has no path\n" if !$scfg->{path};
my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
$class->parse_volname($volname);
my $path = $scfg->{path};
- die "storage definintion has no path\n" if !$path;
+ die "storage definition has no path\n" if !$path;
my $timeout = 2;
my $res = PVE::Tools::df($path, $timeout);
my $path = $scfg->{path};
- die "storage definintion has no path\n" if !$path;
+ die "storage definition has no path\n" if !$path;
# this path test may hang indefinitely on unresponsive mounts
my $timeout = 2;
die "unsupported format '$fmt'" if $fmt ne 'raw';
- die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
+ die "illegal name '$name' - should be 'vm-$vmid-*'\n"
if $name && $name !~ m/^vm-$vmid-/;
my $volname = $name;
my $tests = [
# failed matches
[ $scfg_with_path, 'none', "unknown vtype 'none'\n" ],
- [ {}, 'iso', "storage definintion has no path\n" ],
+ [ {}, 'iso', "storage definition has no path\n" ],
];
# creates additional positive tests