我使用 OpenSuSE Tumbleweed 并拥有以下磁盘:
- /dev/sda1:/home (btrfs)
- /dev/sdb1:/启动
- /dev/sdb2:交换
- /dev/sdb3: / (btrfs)
当我启动计算机时,systemd 尝试挂载我的磁盘但超时。系统启动进入恢复模式。当我尝试手动将 /dev/sda1 安装到 /mnt 时,成功成功,没有任何问题。但是,如果我这样做mount /dev/sda1 /home
,命令会成功,但不会安装任何内容。此外,systemd 有时会在 10 分钟左右后成功挂载我的磁盘,但并非总是如此。如果是这样,我可以毫无问题地继续启动。该日志包含以下消息:
May 04 18:59:58 linux-499u systemd[1]: Started Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.device: Job dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.device/start timed out.
May 04 19:00:18 linux-499u systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.device.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /dev/disk/by-uuid/daf78b04-5d7c-473a-abf7-aaff0f33ed8c.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for Swap.
May 04 19:00:18 linux-499u systemd[1]: swap.target: Job swap.target/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.swap: Job dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.swap/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.device: Job dev-disk-by\x2duuid-daf78b04\x2d5d7c\x2d473a\x2dabf7\x2daaff0f33ed8c.device/start failed with result 'timeout'.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-3b038204\x2dd88d\x2d4a1c\x2db754\x2d4a9a1743a854.device: Job dev-disk-by\x2duuid-3b038204\x2dd88d\x2d4a1c\x2db754\x2d4a9a1743a854.device/start timed out.
May 04 19:00:18 linux-499u systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-3b038204\x2dd88d\x2d4a1c\x2db754\x2d4a9a1743a854.device.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /home.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for Local File Systems.
May 04 19:00:18 linux-499u systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
May 04 19:00:18 linux-499u systemd[1]: home.mount: Job home.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-3b038204\x2dd88d\x2d4a1c\x2db754\x2d4a9a1743a854.device: Job dev-disk-by\x2duuid-3b038204\x2dd88d\x2d4a1c\x2db754\x2d4a9a1743a854.device/start failed with result 'timeout'.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-a7d21263\x2dc328\x2d476d\x2db8f0\x2d93d73f1d57bb.device: Job dev-disk-by\x2duuid-a7d21263\x2dc328\x2d476d\x2db8f0\x2d93d73f1d57bb.device/start timed out.
May 04 19:00:18 linux-499u systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-a7d21263\x2dc328\x2d476d\x2db8f0\x2d93d73f1d57bb.device.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /tmp.
May 04 19:00:18 linux-499u systemd[1]: tmp.mount: Job tmp.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /srv.
May 04 19:00:18 linux-499u systemd[1]: srv.mount: Job srv.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/pgsql.
May 04 19:00:18 linux-499u systemd[1]: var-lib-pgsql.mount: Job var-lib-pgsql.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /opt.
May 04 19:00:18 linux-499u systemd[1]: opt.mount: Job opt.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/mysql.
May 04 19:00:18 linux-499u systemd[1]: var-lib-mysql.mount: Job var-lib-mysql.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/cache.
May 04 19:00:18 linux-499u systemd[1]: var-cache.mount: Job var-cache.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/spool.
May 04 19:00:18 linux-499u systemd[1]: var-spool.mount: Job var-spool.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/mariadb.
May 04 19:00:18 linux-499u systemd[1]: var-lib-mariadb.mount: Job var-lib-mariadb.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/opt.
May 04 19:00:18 linux-499u systemd[1]: var-opt.mount: Job var-opt.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/mailman.
May 04 19:00:18 linux-499u systemd[1]: var-lib-mailman.mount: Job var-lib-mailman.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/tmp.
May 04 19:00:18 linux-499u systemd[1]: var-tmp.mount: Job var-tmp.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/log.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for Update UTMP about System Boot/Shutdown.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for Update UTMP about System Runlevel Changes.
May 04 19:00:18 linux-499u systemd[1]: systemd-update-utmp-runlevel.service: Job systemd-update-utmp-runlevel.service/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: systemd-update-utmp.service: Job systemd-update-utmp.service/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for Flush Journal to Persistent Storage.
May 04 19:00:18 linux-499u systemd[1]: systemd-journal-flush.service: Job systemd-journal-flush.service/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: var-log.mount: Job var-log.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /usr/local.
May 04 19:00:18 linux-499u systemd[1]: usr-local.mount: Job usr-local.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/machines.
May 04 19:00:18 linux-499u systemd[1]: var-lib-machines.mount: Job var-lib-machines.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/crash.
May 04 19:00:18 linux-499u systemd[1]: var-crash.mount: Job var-crash.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/named.
May 04 19:00:18 linux-499u systemd[1]: var-lib-named.mount: Job var-lib-named.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /var/lib/libvirt/images.
May 04 19:00:18 linux-499u systemd[1]: var-lib-libvirt-images.mount: Job var-lib-libvirt-images.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: Dependency failed for /.snapshots.
May 04 19:00:18 linux-499u systemd[1]: \x2esnapshots.mount: Job \x2esnapshots.mount/start failed with result 'dependency'.
May 04 19:00:18 linux-499u systemd[1]: dev-disk-by\x2duuid-a7d21263\x2dc328\x2d476d\x2db8f0\x2d93d73f1d57bb.device: Job dev-disk-by\x2duuid-a7d21263\x2dc328\x2d476d\x2db8f0\x2d93d73f1d57bb.device/start failed with result 'timeout'.
/etc/fstab:
UUID=daf78b04-5d7c-473a-abf7-aaff0f33ed8c swap swap defaults 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb / btrfs defaults 0 0
UUID=3b038204-d88d-4a1c-b754-4a9a1743a854 /home btrfs defaults 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /opt btrfs subvol=@/opt 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /srv btrfs subvol=@/srv 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /tmp btrfs subvol=@/tmp 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /usr/local btrfs subvol=@/usr/local 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/cache btrfs subvol=@/var/cache 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/crash btrfs subvol=@/var/crash 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/machines btrfs subvol=@/var/lib/machines 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/log btrfs subvol=@/var/log 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/opt btrfs subvol=@/var/opt 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/spool btrfs subvol=@/var/spool 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=a7d21263-c328-476d-b8f0-93d73f1d57bb /.snapshots btrfs subvol=@/.snapshots 0 0
systemctl status
:
● linux-499u
State: initializing
Jobs: 13 queued
Failed: 0 units
Since: Fri 2018-05-04 18:58:47 CEST; 18min ago
CGroup: /
├─init.scope
│ └─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 33
└─system.slice
├─lvm2-lvmetad.service
│ └─484 /usr/sbin/lvmetad -f
├─emergency.service
│ ├─683 /usr/lib/systemd/systemd-sulogin-shell emergency
│ ├─684 bash
│ └─768 systemctl status
├─systemd-remount-fs.service
│ ├─476 /usr/lib/systemd/systemd-remount-fs
│ └─478 /usr/bin/mount / -o remount
├─systemd-journald.service
│ └─465 /usr/lib/systemd/systemd-journald
└─haveged.service
└─562 /usr/sbin/haveged -w 1024 -v 0 -F
编辑:正如@okurz建议的,我使用以下命令查看了安装过程的堆栈cat /proc/<pid>/stack
:
[<0>] wait_current_trans+0x9d/0xc0 [btrfs]
[<0>] start_transaction+0x328/0x420 [btrfs]
[<0>] merge_reloc_root+0x160/0x520 [btrfs]
[<0>] merge_reloc_roots+0x12c/0x220 [btrfs]
[<0>] btrfs_recover_relocation+0x295/0x430 [btrfs]
[<0>] btrfs_remount+0x45c/0x500 [btrfs]
[<0>] do_remount_sb+0xaf/0x1c0
[<0>] do_mount+0x665/0xc40
[<0>] SyS_mount+0x80/0xd0
[<0>] do_syscall_64+0x76/0x140
[<0>] entry_SYSCALL_64_after_hwframe+0x42/0xb7
[<0>] 0xffffffffffffffff
然而,老实说,我不知道恢复重定位是做什么的,也不知道它为什么被卡住。
编辑2:让计算机运行几个小时后,目前一切似乎都工作正常;不过,我以前已经这么做过,不知道这次有什么不同。
编辑3:计算机再次工作几天后,它开始btrfs balance
卡住,所以我不得不关闭它的电源。现在我又回到了原点。