]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/CephFSPlugin.pm
Added a LOG_EXT constant as a counterpart to NOTES_EXT
[pve-storage.git] / PVE / Storage / CephFSPlugin.pm
index 3b9a791e1a61b0a27cabd4aac245bfdab064010d..497674729e20f5982b915391979395dd9050938f 100644 (file)
@@ -87,6 +87,7 @@ sub cephfs_mount {
     my $secretfile = $cmd_option->{keyring};
     my $server = $cmd_option->{mon_host} // PVE::CephConfig::get_monaddr_list($configfile);
     my $type = 'ceph';
+    my $fs_name = $scfg->{'fs-name'};
 
     my @opts = ();
     if ($scfg->{fuse}) {
@@ -94,10 +95,12 @@ sub cephfs_mount {
        push @opts, "ceph.id=$cmd_option->{userid}";
        push @opts, "ceph.keyfile=$secretfile" if defined($secretfile);
        push @opts, "ceph.conf=$configfile" if defined($configfile);
+       push @opts, "ceph.client_fs=$fs_name" if defined($fs_name);
     } else {
        push @opts, "name=$cmd_option->{userid}";
        push @opts, "secretfile=$secretfile" if defined($secretfile);
        push @opts, "conf=$configfile" if defined($configfile);
+       push @opts, "fs=$fs_name" if defined($fs_name);
     }
 
     push @opts, $scfg->{options} if $scfg->{options};
@@ -128,6 +131,10 @@ sub properties {
            description => "Subdir to mount.",
            type => 'string', format => 'pve-storage-path',
        },
+       'fs-name' => {
+           description => "The Ceph filesystem name.",
+           type => 'string', format => 'pve-configid',
+       },
     };
 }
 
@@ -148,6 +155,8 @@ sub options {
        maxfiles => { optional => 1 },
        keyring => { optional => 1 },
        'prune-backups' => { optional => 1 },
+       'max-protected-backups' => { optional => 1 },
+       'fs-name' => { optional => 1 },
     };
 }
 
@@ -232,14 +241,26 @@ sub deactivate_storage {
     }
 }
 
+# FIXME remove on the next APIAGE reset.
+# Deprecated, use get_volume_attribute instead.
 sub get_volume_notes {
     my $class = shift;
     PVE::Storage::DirPlugin::get_volume_notes($class, @_);
 }
 
+# FIXME remove on the next APIAGE reset.
+# Deprecated, use update_volume_attribute instead.
 sub update_volume_notes {
     my $class = shift;
     PVE::Storage::DirPlugin::update_volume_notes($class, @_);
 }
 
+sub get_volume_attribute {
+    return PVE::Storage::DirPlugin::get_volume_attribute(@_);
+}
+
+sub update_volume_attribute {
+    return PVE::Storage::DirPlugin::update_volume_attribute(@_);
+}
+
 1;