diff --git a/internal/server/storage/drivers/driver_zfs.go b/internal/server/storage/drivers/driver_zfs.go index a600f2a2021..df5b7c5d902 100644 --- a/internal/server/storage/drivers/driver_zfs.go +++ b/internal/server/storage/drivers/driver_zfs.go @@ -71,12 +71,6 @@ func (d *zfs) load() error { return nil } - // Load the kernel module. - err := linux.LoadModule("zfs") - if err != nil { - return fmt.Errorf("Error loading %q module: %w", "zfs", err) - } - // Validate the needed tools are present. for _, tool := range []string{"zpool", "zfs"} { _, err := exec.LookPath(tool) @@ -85,6 +79,12 @@ func (d *zfs) load() error { } } + // Load the kernel module. + err := linux.LoadModule("zfs") + if err != nil { + return fmt.Errorf("Error loading %q module: %w", "zfs", err) + } + // Get the version information. if zfsVersion == "" { version, err := d.version()