5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-12 09:18:01 +03:00

Change zfspoolplugin path when snapshot is given.

Zfs subvol snapshots are always mounted under $path_of_subvol/.zfs/$snapname
This commit is contained in:
Wolfgang Link 2015-11-19 12:28:20 +01:00 committed by Dietmar Maurer
parent e2fbf28fbd
commit fdd31ce759

View File

@ -149,12 +149,12 @@ sub path {
if ($vtype eq "images") {
if ($volname =~ m/^subvol-/) {
# fixme: we currently assume standard mount point?!
$path = "/$scfg->{pool}/$volname";
$path .= "/.zfs/snapshot/$snapname" if defined($snapname);
} else {
$path = "/dev/zvol/$scfg->{pool}/$volname";
$path .= "\@$snapname" if defined($snapname);
}
$path .= "\@$snapname" if defined($snapname);
} else {
die "$vtype is not allowed in ZFSPool!";
}