gpt4 book ai didi

ubuntu - lxd init失败,提示缺少zfs,但已安装

转载 作者:太空宇宙 更新时间:2023-11-03 17:09:49 28 4
gpt4 key购买 nike

我正在执行“ Geting started with Juju”步骤。

作为前提条件,我已经安装了LXD和ZFS。

root@d9574a01cb50:/# which lxd
/usr/bin/lxd
root@d9574a01cb50:/# which zfs
/sbin/zfs


但是,当我运行lxd init并选择zfs作为存储后端时,它无法显示zfs丢失。

root@d9574a01cb50:/# lxd init
Name of the storage backend to use (dir or zfs) [default=dir]: zfs
error: The requested backend 'zfs' isn't available on your system (missing tools).


即使我尝试再次安装zfs,它也表示已安装。

root@d9574a01cb50:/# apt install zfsutils-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
zfsutils-linux is already the newest version (0.6.5.8-0ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


我不确定这是怎么回事,或者我错过了任何事情。

最佳答案

@ASR,我遇到了同样的问题,并通过在兼容的内核上重新运行来绕过它。

建议您使用默认建议的FS,而不是ZFS,因为我怀疑您正在运行的旧内核(例如3.19 Low Latency)不支持ZFS。

您可以使用较新的内核重新启动Ubuntu,LXD的初始化将顺利进行,如下所述。

要检查您当前的内核:

$ uname -a 

Linux xxx-HP *4.4.0-77-generic* #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


要检查系统上安装的ZFS版本:

$ locate zfs.ko


要检查系统上的可用内核:

$ dpkg --list | grep linux-image


在兼容(新内核)中重启后:

$ sudo lxd init

[sudo] password for xxx:
Name of the storage backend to use (dir or zfs) [default=zfs]:
Create a new ZFS pool (yes/no) [default=yes]?
Name of the new ZFS pool [default=lxd]:
Would you like to use an existing block device (yes/no) [default=no]?
Size in GB of the new loop device (1GB minimum) [default=41]: 20
Would you like LXD to be available over the network (yes/no) [default=no]?
Do you want to configure the LXD bridge (yes/no) [default=yes]?
Warning: Stopping lxd.service, but it can still be activated by:
lxd.socket
LXD has been successfully configured.

关于ubuntu - lxd init失败,提示缺少zfs,但已安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41610476/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com