我已经在 ZFS 上运行 20.04 w/root 几个月了,没有出现重大问题。
今天早上,我跑了一个apt dist-upgrade
,我得到了以下错误:
mjb@feynmann:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up zfsutils-linux (0.8.3-1ubuntu12.1) ...
zfs-import-scan.service is a disabled or a static unit, not starting it.
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-mount.service failed because a fatal signal was delivered to the control process.
See "systemctl status zfs-mount.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zfs-mount, action "start" failed.
● zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Wed 2020-06-03 09:38:01 EDT; 4ms ago
Docs: man:zfs(8)
Process: 760032 ExecStart=/sbin/zfs mount -a (code=killed, signal=ABRT)
Main PID: 760032 (code=killed, signal=ABRT)
Jun 03 09:38:00 feynmann systemd[1]: Starting Mount ZFS filesystems...
Jun 03 09:38:00 feynmann zfs[760032]: cannot mount '/root': directory is not empty
Jun 03 09:38:00 feynmann zfs[760032]: cannot mount '/var/cache': directory is not empty
Jun 03 09:38:00 feynmann zfs[760032]: cannot mount '/var/lib/AccountsService': directory is not empty
Jun 03 09:38:00 feynmann zfs[760032]: free(): double free detected in tcache 2
Jun 03 09:38:01 feynmann systemd[1]: zfs-mount.service: Main process exited, code=killed, status=6/ABRT
Jun 03 09:38:01 feynmann systemd[1]: zfs-mount.service: Failed with result 'signal'.
Jun 03 09:38:01 feynmann systemd[1]: Failed to start Mount ZFS filesystems.
dpkg: error processing package zfsutils-linux (--configure):
installed zfsutils-linux package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of zfs-initramfs:
zfs-initramfs depends on zfsutils-linux (>= 0.8.3-1ubuntu12.1); however:
Package zfsutils-linux is not configured yet.
dpkg: error processing package zfs-initramfs (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zfs-zed:
zfs-zed depends on zfsutils-linux (>= 0.8.3-1ubuntu12.1); however:
Package zfsutils-linux is not configured yet.
dpkg: error processing package zfs-zed (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message i
ndicates its a followup error from a previous failure.
Errors were encountered while processing:
zfsutils-linux
zfs-initramfs
zfs-zed
E: Sub-process /usr/bin/dpkg returned an error code (1)
更多信息:
mjb@feynmann:~$ sudo systemctl status zfs-mount.service
● zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Wed 2020-06-03 09:38:01 EDT; 1min 9s ago
Docs: man:zfs(8)
Process: 760032 ExecStart=/sbin/zfs mount -a (code=killed, signal=ABRT)
Main PID: 760032 (code=killed, signal=ABRT)
Jun 03 09:38:00 feynmann systemd[1]: Starting Mount ZFS filesystems...
Jun 03 09:38:00 feynmann zfs[760032]: cannot mount '/root': directory is not empty
Jun 03 09:38:00 feynmann zfs[760032]: cannot mount '/var/cache': directory is not empty
Jun 03 09:38:00 feynmann zfs[760032]: cannot mount '/var/lib/AccountsService': directory is not empty
Jun 03 09:38:00 feynmann zfs[760032]: free(): double free detected in tcache 2
Jun 03 09:38:01 feynmann systemd[1]: zfs-mount.service: Main process exited, code=killed, status=6/ABRT
Jun 03 09:38:01 feynmann systemd[1]: zfs-mount.service: Failed with result 'signal'.
Jun 03 09:38:01 feynmann systemd[1]: Failed to start Mount ZFS filesystems.
mjb@feynmann:~$ sudo journalctl -xe
-- The process' exit code is 'killed' and its exit status is 6.
Jun 03 09:38:01 feynmann systemd[1]: zfs-mount.service: Failed with result 'signal'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zfs-mount.service has entered the 'failed' state with result 'signal'.
Jun 03 09:38:01 feynmann systemd[1]: Failed to start Mount ZFS filesystems.
-- Subject: A start job for unit zfs-mount.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zfs-mount.service has finished with a failure.
--
-- The job identifier is 16641 and the job result is failed.
Jun 03 09:38:01 feynmann dbus-daemon[2075]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by>
Jun 03 09:38:01 feynmann systemd[1]: Starting PackageKit Daemon...
-- Subject: A start job for unit packagekit.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit packagekit.service has begun execution.
--
-- The job identifier is 16649.
Jun 03 09:38:01 feynmann PackageKit[760066]: daemon start
Jun 03 09:38:01 feynmann dbus-daemon[2075]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Jun 03 09:38:01 feynmann systemd[1]: Started PackageKit Daemon.
-- Subject: A start job for unit packagekit.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit packagekit.service has finished successfully.
--
-- The job identifier is 16649.
Jun 03 09:38:01 feynmann sudo[759659]: pam_unix(sudo:session): session closed for user root
Jun 03 09:39:10 feynmann sudo[760629]: mjb : TTY=pts/4 ; PWD=/home/mjb ; USER=root ; COMMAND=/usr/bin/systemctl status zfs-mount.service
Jun 03 09:39:10 feynmann sudo[760629]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 03 09:39:10 feynmann sudo[760629]: pam_unix(sudo:session): session closed for user root
Jun 03 09:39:15 feynmann sudo[760671]: mjb : TTY=pts/4 ; PWD=/home/mjb ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Jun 03 09:39:15 feynmann sudo[760671]: pam_unix(sudo:session): session opened for user root by (uid=0)
更多信息:
看来问题在于apt install zfsuitls-linux
,它得到:
mjb@feynmann:~$ sudo apt install zfsutils-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
zfsutils-linux is already the newest version (0.8.3-1ubuntu12.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up zfsutils-linux (0.8.3-1ubuntu12.1) ...
zfs-import-scan.service is a disabled or a static unit, not starting it.
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-mount.service failed because a fatal signal was delivered to the control process.
See "systemctl status zfs-mount.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zfs-mount, action "start" failed.
● zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Thu 2020-06-04 05:49:45 EDT; 4ms ago
Docs: man:zfs(8)
Process: 1176564 ExecStart=/sbin/zfs mount -a (code=killed, signal=ABRT)
Main PID: 1176564 (code=killed, signal=ABRT)
Jun 04 05:49:45 feynmann systemd[1]: Starting Mount ZFS filesystems...
Jun 04 05:49:45 feynmann zfs[1176564]: cannot mount '/root': directory is not empty
Jun 04 05:49:45 feynmann zfs[1176564]: cannot mount '/var/cache': directory is not empty
Jun 04 05:49:45 feynmann zfs[1176564]: cannot mount '/var/lib/AccountsService': directory is not empty
Jun 04 05:49:45 feynmann zfs[1176564]: free(): double free detected in tcache 2
Jun 04 05:49:45 feynmann systemd[1]: zfs-mount.service: Main process exited, code=killed, status=6/ABRT
Jun 04 05:49:45 feynmann systemd[1]: zfs-mount.service: Failed with result 'signal'.
Jun 04 05:49:45 feynmann systemd[1]: Failed to start Mount ZFS filesystems.
dpkg: error processing package zfsutils-linux (--configure):
installed zfsutils-linux package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of zfs-initramfs:
zfs-initramfs depends on zfsutils-linux (>= 0.8.3-1ubuntu12.1); however:
Package zfsutils-linux is not configured yet.
dpkg: error processing package zfs-initramfs (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zfs-zed:
zfs-zed depends on zfsutils-linux (>= 0.8.3-1ubuntu12.1); however:
Package zfsutils-linux is not configured yet.
dpkg: error processing package zfs-zed (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
zfsutils-linux
zfs-initramfs
zfs-zed
E: Sub-process /usr/bin/dpkg returned an error code (1)
经过仔细检查,我看到:
Job for zfs-mount.service failed because a fatal signal was delivered to the control process.
See "systemctl status zfs-mount.service" and "journalctl -xe" for details.
所以,我尝试了:
mjb@feynmann:~$ systemctl status zfs-mount.service
● zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Thu 2020-06-04 05:49:45 EDT; 3min 1s ago
Docs: man:zfs(8)
Process: 1176564 ExecStart=/sbin/zfs mount -a (code=killed, signal=ABRT)
Main PID: 1176564 (code=killed, signal=ABRT)
最后:
mjb@feynmann:~$ sudo /sbin/zfs mount -a
cannot mount '/root': directory is not empty
cannot mount '/var/cache': directory is not empty
cannot mount '/var/lib/AccountsService': directory is not empty
Segmentation fault
在这一点上,我迷路了。
还有更多信息:
mjb@feynmann:~$ cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
PARTUUID=84ba431b-1974-486b-b859-41f7417c5b1e /boot/efi vfat nofail,x-systemd.device-timeout=1 0 1
bpool/BOOT/ubuntu /boot zfs nodev,relatime,x-systemd.requires=zfs-import-bpool.service 0 0
rpool/var/log /var/log zfs nodev,relatime 0 0
rpool/var/spool /var/spool zfs nodev,relatime 0 0
rpool/var/tmp /var/tmp zfs nodev,relatime 0 0
/dev/zvol/rpool/swap none swap discard 0 0
为什么我的 fstab 会被取消配置?
帮助?
好吧,我仍然没有根本原因,但是,当我安装这个系统时,在 20.04 发布后的一两天,我只是使用了 18.04 Root On ZFS 的方向,并且它似乎工作正常,大部分情况下.
但是,由于 ZFS 上 20.04 Root 的官方说明现已发布,我对我的笔记本电脑进行了彻底的擦除和重新加载,并使用了新的说明(在 fw 点上确实有所不同)。
到目前为止,一切都很好。没有问题,一切运行良好。
如果我找到了问题的根本原因和解决方案,我会感到更满意,但是擦除和重新加载似乎确实解决了这个问题。