]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/NFSPlugin.pm
drbd: comment that the builtin plugin is depreacated
[pve-storage.git] / PVE / Storage / NFSPlugin.pm
index 82b0c5ffe46cf001fc335c6b854d6ab928919e6c..e8e27c090ff4992d3b7253e0135ea202efedcd4f 100644 (file)
@@ -79,9 +79,10 @@ sub options {
        path => { fixed => 1 },
        server => { fixed => 1 },
        export => { fixed => 1 },
-        nodes => { optional => 1 },
+       nodes => { optional => 1 },
        disable => { optional => 1 },
-        maxfiles => { optional => 1 },
+       maxfiles => { optional => 1 },
+       'prune-backups' => { optional => 1 },
        options => { optional => 1 },
        content => { optional => 1 },
        format => { optional => 1 },
@@ -126,11 +127,8 @@ sub activate_storage {
     my $server = $scfg->{server};
     my $export = $scfg->{export};
 
-    if (!nfs_is_mounted($server, $export, $path, $cache->{mountdata})) {    
-                   
-       # NOTE: only call mkpath when not mounted (avoid hang 
-       # when NFS server is offline 
-                   
+    if (!nfs_is_mounted($server, $export, $path, $cache->{mountdata})) {
+       # NOTE: only call mkpath when not mounted (avoid hang when NFS server is offline
        mkpath $path if !(defined($scfg->{mkdir}) && !$scfg->{mkdir});
 
        die "unable to activate storage '$storeid' - " .
@@ -165,9 +163,7 @@ sub check_connection {
 
     my $cmd = ['/sbin/showmount', '--no-headers', '--exports', $server];
 
-    eval {
-       run_command($cmd, timeout => 2, outfunc => sub {}, errfunc => sub {});
-    };
+    eval { run_command($cmd, timeout => 10, outfunc => sub {}, errfunc => sub {}) };
     if (my $err = $@) {
        return 0;
     }
@@ -175,4 +171,13 @@ sub check_connection {
     return 1;
 }
 
+sub get_volume_notes {
+    my $class = shift;
+    PVE::Storage::DirPlugin::get_volume_notes($class, @_);
+}
+sub update_volume_notes {
+    my $class = shift;
+    PVE::Storage::DirPlugin::update_volume_notes($class, @_);
+}
+
 1;