我推迟了昨天对文件服务器 14.04LTS 的更新。这次升级彻底破坏了 ZFS。
我已经尝试了在此网站上找到的所有方法,例如:
我试过:
sudo add-apt-repository --remove ppa:zfs-native/stable
sudo apt clean
然后:apt-get install zfsutils-linux
返回:
zfsutils-linux is already the newest version (0.6.5.6-0ubuntu28).
您可能需要运行“apt-get -f install”来纠正这些问题:
The following packages have unmet dependencies:
zfs-zed : Depends: libnvpair1linux but it is not going to be installed
Depends: libzfs2linux but it is not going to be installed
zfsutils-linux : Depends: libnvpair1linux but it is not going to be installed
Depends: libuutil1linux but it is not going to be installed
Depends: libzfs2linux but it is not going to be installed
Depends: libzpool2linux but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).'
所以我尝试
sudo apt-get -f install
现在我得到:
After this operation, 1,775 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libuutil1linux amd64 0.6.5.6-0ubuntu28 [27.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libnvpair1linux amd64 0.6.5.6-0ubuntu28 [23.5 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libzpool2linux amd64 0.6.5.6-0ubuntu28 [384 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libzfs2linux amd64 0.6.5.6-0ubuntu28 [107 kB]
Fetched 542 kB in 0s (636 kB/s)
(Reading database ... 1279402 files and directories currently installed.)
Preparing to unpack .../libuutil1linux_0.6.5.6-0ubuntu28_amd64.deb ...
Unpacking libuutil1linux (0.6.5.6-0ubuntu28) ...
dpkg: error processing archive /var/cache/apt/archives/libuutil1linux_0.6.5.6-0ubuntu28_amd64.deb (--unpack):
trying to overwrite '/lib/libuutil.so.1.0.1', which is also in package libuutil1 0.6.5.4-1~precise
Preparing to unpack .../libnvpair1linux_0.6.5.6-0ubuntu28_amd64.deb ...
Unpacking libnvpair1linux (0.6.5.6-0ubuntu28) ...
dpkg: error processing archive /var/cache/apt/archives/libnvpair1linux_0.6.5.6-0ubuntu28_amd64.deb (--unpack):
trying to overwrite '/lib/libnvpair.so.1.0.1', which is also in package libnvpair1 0.6.5.4-1~precise
Preparing to unpack .../libzpool2linux_0.6.5.6-0ubuntu28_amd64.deb ...
Unpacking libzpool2linux (0.6.5.6-0ubuntu28) ...
dpkg: error processing archive /var/cache/apt/archives/libzpool2linux_0.6.5.6-0ubuntu28_amd64.deb (--unpack):
trying to overwrite '/lib/libzpool.so.2.0.0', which is also in package libzpool2 0.6.5.4-1~precise
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../libzfs2linux_0.6.5.6-0ubuntu28_amd64.deb ...
Unpacking libzfs2linux (0.6.5.6-0ubuntu28) ...
dpkg: error processing archive /var/cache/apt/archives/libzfs2linux_0.6.5.6-0ubuntu28_amd64.deb (--unpack):
trying to overwrite '/lib/libzfs.so.2.0.0', which is also in package libzfs2 0.6.5.4-1~precise
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu11.2) ...
Errors were encountered while processing:
/var/cache/apt/archives/libuutil1linux_0.6.5.6-0ubuntu28_amd64.deb
/var/cache/apt/archives/libnvpair1linux_0.6.5.6-0ubuntu28_amd64.deb
/var/cache/apt/archives/libzpool2linux_0.6.5.6-0ubuntu28_amd64.deb
/var/cache/apt/archives/libzfs2linux_0.6.5.6-0ubuntu28_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg -l | grep -i "zfs"
rc libzfs1 0.6.2-1~precise amd64 Native ZFS filesystem library for Linux
ii libzfs2 0.6.5.4-1~precise amd64 Native OpenZFS filesystem library for Linux
rc libzpool1 0.6.2-1~precise amd64 Native ZFS pool library for Linux
ii libzpool2 0.6.5.4-1~precise amd64 Native OpenZFS pool library for Linux
rc ubuntu-zfs 8~precise amd64 Native ZFS filesystem metapackage for Ubuntu.
rc zfs-auto-snapshot 1.0.8-0ubuntu1~precise1 all ZFS Automatic Snapshot Service
ii zfs-dkms 0.6.5.6-0ubuntu28 amd64 Native OpenZFS filesystem kernel modules for Linux
ii zfs-doc 0.6.5.6-0ubuntu28 all Native OpenZFS filesystem documentation and examples.
iU zfs-zed 0.6.5.6-0ubuntu28 amd64 OpenZFS Event Daemon (zed)
rc zfsutils 0.6.5.4-1~precise amd64 Native OpenZFS management utilities for Linux
iU zfsutils-linux 0.6.5.6-0ubuntu28 amd64 Native OpenZFS management utilities for Linux
好的,进行了一些改进,通过结合dpkg
和命令apt
,apt-get
我能够消除依赖错误。
现在,该问题已经记录下来,但解决方案对我没有帮助。
首先我这样做:重启
apt clean
apt update
apt purge zfs*
apt-get remove spl dkms spl-dkms
apt-get autoremove
reboot
sudo apt-get install zfsutils-linux zfs-initramfs spl-dkms
(我添加了 zfs-initramfs,因为它被建议了)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dkms libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl zfs-dkms zfs-doc zfs-zed
The following NEW packages will be installed:
dkms libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl spl-dkms zfs-dkms zfs-doc zfs-initramfs zfs-zed zfsutils-linux
0 upgraded, 12 newly installed, 0 to remove and 109 not upgraded.
Need to get 2,456 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
......
我收到一个错误:
ERROR (dkms apport): kernel package linux-headers-3.13.0-181-generic is not supported
Error! Bad return status for module build on kernel: 3.13.0-181-generic (x86_64)
Consult /var/lib/dkms/zfs/0.6.5.6/build/make.log for more information.
我现在该怎么办?我遇到了内核问题吗?
答案1
我确实遇到了内核问题。我没有意识到更新程序没有触及内核。当我更新到 4.+ 时,所有问题都消失了!呼...