2017-01-12 74 views
1

我正在關注「Geting started with Juju」步驟。lxd init失敗,說zfs丟失,但已安裝

作爲先決條件,我已經安裝了LXD和ZFS。

[email protected]:/# which lxd /usr/bin/lxd [email protected]:/# which zfs /sbin/zfs

但是當我運行lxd init並選擇zfs作爲存儲後端它不能說ZFS丟失。

[email protected]:/# 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,它說已經安裝。

[email protected]:/# 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.

我不知道什麼是錯的,否則我已經錯過了什麼。

+1

您是否試過將_-- storage-pool = POOL_傳遞給_lxd init_命令? – airhuff

+0

@airfuff'lxd init --storage-pool = POOL' **'錯誤:初始化配置只對--auto有效** – ASR

+0

您使用單詞'POOL'還是_your_池的名稱?無論如何,那個錯誤信息表明我的想法不適合你。 – airhuff

回答

0


@ASR,
我面臨同樣的問題,並繞過它在兼容的內核上重新運行。

由於我懷疑你正在運行一個不支持ZFS的舊內核(例如3.19低延遲),因此建議向DIR提供默認建議的FS而不是ZFS。

您可以重新啓動Ubuntu,使用較新的內核,LXD的init應該順利運行,如下所示。

要查看當前的內核:

$ 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.