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:
parent
e2fbf28fbd
commit
fdd31ce759
@ -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!";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user