Change zfspoolplugin path when snapshot is given.
Zfs subvol snapshots are always mounted under $path_of_subvol/.zfs/$snapname
This commit is contained in:
committed by
Dietmar Maurer
parent
e2fbf28fbd
commit
fdd31ce759
@ -149,12 +149,12 @@ sub path {
|
|||||||
|
|
||||||
if ($vtype eq "images") {
|
if ($vtype eq "images") {
|
||||||
if ($volname =~ m/^subvol-/) {
|
if ($volname =~ m/^subvol-/) {
|
||||||
# fixme: we currently assume standard mount point?!
|
|
||||||
$path = "/$scfg->{pool}/$volname";
|
$path = "/$scfg->{pool}/$volname";
|
||||||
|
$path .= "/.zfs/snapshot/$snapname" if defined($snapname);
|
||||||
} else {
|
} else {
|
||||||
$path = "/dev/zvol/$scfg->{pool}/$volname";
|
$path = "/dev/zvol/$scfg->{pool}/$volname";
|
||||||
|
$path .= "\@$snapname" if defined($snapname);
|
||||||
}
|
}
|
||||||
$path .= "\@$snapname" if defined($snapname);
|
|
||||||
} else {
|
} else {
|
||||||
die "$vtype is not allowed in ZFSPool!";
|
die "$vtype is not allowed in ZFSPool!";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user