Systemd-analyze 给我不同的结果取决于我执行它的次数,我正在做Systemd-analyze verify mnt-HDDs.mount
和得到:
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on systemd-update-done.service/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with local-fs.target/start
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on systemd-journal-catalog-update.service/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job systemd-journal-catalog-update.service/start deleted to break ordering cycle starting with local-fs.target/start
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on systemd-machine-id-commit.service/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job systemd-machine-id-commit.service/start deleted to break ordering cycle starting with local-fs.target/start
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job local-fs.target/start deleted to break ordering cycle starting with local-fs.target/start
sysinit.target: Found ordering cycle on plymouth-read-write.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on mnt-HDDs.mount/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job plymouth-read-write.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on local-fs.target/start
sysinit.target: Found dependency on mnt-HDDs.mount/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on systemd-update-done.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on systemd-machine-id-commit.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job systemd-machine-id-commit.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on systemd-tmpfiles-setup.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on plymouth-read-write.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job plymouth-read-write.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
mnt-HDDs.mount 中直接涉及的创建单元:
mnt-HDDs.mount:
[Unit]
Description=Mount unit for encripted device /mnt/HDDs
After=HDDs-unlock.service
[Mount]
Where=/mnt/HDDs
What=/dev/mapper/cryptHDDB
Type=btrfs
Options=noatime,compress-force=zstd,autodefrag,flushoncommit
HDDs-unlock.service
[Unit]
Description=HDDB and HDDC unlock
After=media-key.mount umount.target local-fs-pre.target
Before=local-fs.target
Conflicts=umount.target
[Service]
Type=oneshot
RemainAfterExit=yes
KillMode=none
ExecStart=/usr/bin/HDDs-unlock.sh
ExecStop=/usr/bin/HDDs-lock.sh
[Install]
RequiredBy=mnt-HDDs.mount
媒体密钥.mount
[Unit]
Description=HDDs key
StopWhenUnneeded=true
[Mount]
Where=/media/key
What=/dev/disk/by-id/usb-SMI_USB_DISK_AA00000000065845-0:0
Options=ro,offset=952320
DirectoryMode=0400
[Install]
RequiredBy=HDDs-unlock.service
有一个fstab
条目/mnt/HDDs/@
通过自动依赖调用来安装mnt-HDDs.mount
,在重新启动以寻找解决方案时,有时它会使我的启动跳过一些服务,有时会在没有网络的情况下启动,对解决这个排序周期有什么启示吗?