Check whether 'zfs get mountpoint' returns a valid absolute path
The command 'zfs get mountpoint' can return 'none' and so 'mountpoint none' was written to storage.cfg, which would block the fall-back to using the default mount point when requesting a path, see [0]. [0]: https://forum.proxmox.com/threads/zfs-backup-with-snapshot-mode-fails.61927/#post-284123 Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
1022a7c4a9
commit
75815bf556
@ -153,8 +153,10 @@ sub on_add_hook {
|
|||||||
my $cfg_mountpoint = $scfg->{mountpoint};
|
my $cfg_mountpoint = $scfg->{mountpoint};
|
||||||
|
|
||||||
# ignore failure, pool might currently not be imported
|
# ignore failure, pool might currently not be imported
|
||||||
my $mountpoint = eval {
|
my $mountpoint;
|
||||||
$class->zfs_get_properties($scfg, 'mountpoint', $scfg->{pool}, 1)
|
eval {
|
||||||
|
my $res = $class->zfs_get_properties($scfg, 'mountpoint', $scfg->{pool}, 1);
|
||||||
|
$mountpoint = PVE::Storage::Plugin::verify_path($res, 1) if defined($res);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (defined($cfg_mountpoint)) {
|
if (defined($cfg_mountpoint)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user