升级软件包 spl 后 zfs 损坏

升级软件包 spl 后 zfs 损坏

刚才我执行了 apt-get upgrade,将 spl 软件包升级到了 0.6.4.1。重启后,我的 zfs 格式的磁盘无法挂载。 我应该如何恢复 zfs 功能?

所有 zfs 命令现在都中止

Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.

当我按照该说明操作时,insmod /var/lib/dkms/zfs/0.6.3/3.13.0-49-generic/x86_64/module/zfs.ko也会失败:

error inserting '/var/lib/.../zfs.ko': -1 Unknown symbol in module

/etc/lsb-release根据和,操作系统uname -a

12.04.5 LTS
Linux 3.13.0-49-generic #81~precise1-Ubuntu SMP Wed Mar 25 ... x86_64 x86_64 x86_64

也许升级后的 spl 包与其他 zfs 包不兼容,因为dkms status报告 0.6.4.1 与 0.6.3:

fglrx, 13.350.1, 3.13.0-36-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-39-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-40-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-43-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-44-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-45-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-46-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-48-generic, x86_64: installed
fglrx, 13.350.1, 3.13.0-49-generic, x86_64: installed
spl, 0.6.4.1, 3.13.0-46-generic, x86_64: installed
spl, 0.6.4.1, 3.13.0-49-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-36-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-37-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-39-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-40-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-43-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-44-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-45-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-46-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-48-generic, x86_64: installed
zfs, 0.6.3, 3.13.0-49-generic, x86_64: installed
zfs, 0.6.3, 3.8.0-36-generic, x86_64: installed
zfs, 0.6.3, 3.8.0-44-generic, x86_64: installed

apt-cache policy spl据报道仅有的spl 的版本是0.6.4.1-1~precise,所以即使我想取消升级 spl 也无法取消。

安装的其他 zfs 包来自dpkg --get-selections

libzfs1 ubuntu-zfs zfs-auto-snapshot zfs-dkms zfsutils

我宁愿坚持使用 Ubuntu 软件包,而不是(比如说)手动安装 spl-0.6.3http://zfsonlinux.org/。这可能会让事情变得更糟。

[编辑应 gertvdijk 的要求:

# grep -rF zfs /etc/apt
/etc/apt/sources.list.d/zfs-native-stable-precise.list:deb http://ppa.launchpad.net/zfs-native/stable/ubuntu precise main
/etc/apt/sources.list.d/zfs-native-stable-precise.list:deb-src http://ppa.launchpad.net/zfs-native/stable/ubuntu precise main
/etc/apt/preferences.d/pin-zfs-native:Pin: release o=LP-PPA-zfs-native-daily
/etc/apt/preferences.d/pin-zfs-native:Pin: release o=LP-PPA-zfs-native-grub
/etc/apt/preferences.d/pin-zfs-native:Pin: release o=LP-PPA-zfs-native-stable

# apt-cache policy zfs-dkms spl-dkms
zfs-dkms:
  Installed: 0.6.3-2~precise
  Candidate: 0.6.4.1-1~precise
  Version table:
     0.6.4.1-1~precise 0
       1001 http://ppa.launchpad.net/zfs-native/stable/ubuntu/ precise/main amd64 Packages
 *** 0.6.3-2~precise 0
        100 /var/lib/dpkg/status
spl-dkms:
  Installed: 0.6.4.1-1~precise
  Candidate: 0.6.4.1-1~precise
  Version table:
 *** 0.6.4.1-1~precise 0
       1001 http://ppa.launchpad.net/zfs-native/stable/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

]

我该如何恢复?我应该在哪里进一步调查?

答案1

要使 zfs 再次与 spl 兼容,请以 root 身份执行:

apt-get install ubuntu-zfs zfs-dkms
zpool import -a
zfs mount -a

(这总结了 gertvdijk 的评论,他应该为这个答案获得赞扬,但可能已经失去了兴趣,因为已经过去了将近一周。)

相关内容