]> git.proxmox.com Git - pve-storage.git/commitdiff
config: mention that maxfiles is deprecated
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 16 Jun 2021 07:26:57 +0000 (09:26 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 16 Jun 2021 11:20:35 +0000 (13:20 +0200)
Don't add an explicit deprecation warning on parsing (yet), this already done in
the pve6to7 script. Also, automatic conversion to 'prune-backups' happens when
the section config is read, so over time fewer users should be affected.
Postpone explicit warning/dropping the parameter to a future major release.

Also switch the setting for the default 'local' storage to 'prune-backups'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm
PVE/Storage/Plugin.pm

index 3aa21008b17d10360430371f6ddab6ca25ea3102..e109c02101bd873b473efa97d972ead7ffc2364e 100755 (executable)
@@ -125,7 +125,7 @@ sub lock_storage_config {
     }
 }
 
-# FIXME remove maxfiles for PVE 7.0
+# FIXME remove maxfiles for PVE 8.0 or PVE 9.0
 my $convert_maxfiles_to_prune_backups = sub {
     my ($scfg) = @_;
 
index 318d13a6b37acc5e1e356e0a80d346c71fe2ee51..f0c15d5f21868e777bb3c988fe340202be1282aa 100644 (file)
@@ -133,7 +133,8 @@ my $defaultData = {
            optional => 1,
        },
        maxfiles => {
-           description => "Maximal number of backup files per VM. Use '0' for unlimted.",
+           description => "Deprecated: use 'prune-backups' instead. " .
+               "Maximal number of backup files per VM. Use '0' for unlimted.",
            type => 'integer',
            minimum => 0,
            optional => 1,
@@ -402,7 +403,7 @@ sub parse_config {
            type => 'dir',
            priority => 0, # force first entry
            path => '/var/lib/vz',
-           maxfiles => 0,
+           'prune-backups' => 'keep-all=1',
            content => { images => 1, rootdir => 1, vztmpl => 1, iso => 1, snippets => 1},
        };
     }