]> git.proxmox.com Git - pve-container.git/commitdiff
Mounting of zfspool snapshots are not necessary.
authorWolfgang Link <w.link@proxmox.com>
Thu, 19 Nov 2015 11:28:21 +0000 (12:28 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 19 Nov 2015 11:42:24 +0000 (12:42 +0100)
zfs subvol snapshots are allays mounted on $path_of_subvol/.zfs/$snapname

src/PVE/LXC.pm

index c61df23903282eac82097e29b9e9f95d59619e7f..aa705c8f9aaa93b97ff171e02ddb704573a1a65b 100644 (file)
@@ -2141,16 +2141,11 @@ sub mountpoint_mount {
        if ($format eq 'subvol') {
            if ($mount_path) {
                if ($snapname) {
-                   if ($scfg->{type} eq 'zfspool') {
-                       my $path_arg = $path;
-                       $path_arg =~ s!^/+!!;
-                       PVE::Tools::run_command(['mount', '-o', 'ro', '-t', 'zfs', $path_arg, $mount_path]);
-                   } else {
+                   if ($scfg->{type} ne 'zfspool') {
                        die "cannot mount subvol snapshots for storage type '$scfg->{type}'\n";
                    }
-               } else {
-                   PVE::Tools::run_command(['mount', '-o', 'bind', $path, $mount_path]);
                }
+               PVE::Tools::run_command(['mount', '-o', 'bind', $path, $mount_path]);
            }
            return wantarray ? ($path, 0) : $path;
        } elsif ($format eq 'raw' || $format eq 'iso') {